Tottenham and Manchester City will face each other in an all-English quarter-final of the Champions League next month.
United and Liverpool will meet in the semi-finals if they reach the last four, with Tottenham or Manchester City facing the winner of the quarter-final between Ajax and Juventus.
The first legs of the quarter-finals will take place on April 9 and 10, with the second legs on April 16 and 17.
Manchester City won both of their Premier League ties with Tottenham last season and also beat Mauricio Pochettino's side at Wembley earlier in this campaign. The two teams meet again in the league just days after the second leg, on April 20.
Manchester United's tie against Barcelona means caretaker manager Ole Gunnar Solskjaer will enjoy another trip to the Nou Camp, where he scored the winner in United's Champions League final win over Bayern Munich in 1999.
United were drawn as the away team for the first leg but the tie had to be reversed, as UEFA had stipulated in advance following advice from local authorities that they and City could not play at home on successive nights.
Former Liverpool goalkeeper Chris Kirkland was delighted by the draw, telling Sky Sports News: "I'd prefer being at home for the second leg but I'm extremely happy.
"Let's not disrespect Porto because they got to this stage for a reason, but they won't be looking forward to that tie."
Former Manchester City boss Stuart Pearce added: "I think Liverpool have gone as favourites now for the competition, being that side of the draw."
Speaking about Manchester United's tie with Barcelona, former Old Trafford boss David Moyes said: "It's an incredibly tough draw but a great draw. After beating Paris St Germain you can take anybody on.
"A great occasion, the sort of games that Manchester United are used to and it will be a great night."