United, initially drawn away, will play at home in the first leg to avoid a clash with Manchester City, who host Spurs in their second leg.
Barcelona will meet Manchester United in the Champions League last eight in a repeat of the 2009 and 2011 finals which were both won by the Catalans, with the help of goals from Lionel Messi.
Manchester City face Tottenham Hotspur in an all-Premier League clash, their first-ever European meeting, while Cristiano Ronaldo's Juventus meet Ajax Amsterdam, who are back in the last eight after a 16-year absence.
Liverpool, the fourth English representative, will face Porto in a repeat of last year's last 16 tie which they won 5-0 on aggregate.
The semi-final pairings were also made with Tottenham or City to face Ajax or Juventus and Manchester United or Barcelona to meet either Liverpool or Porto.
The draw had an unusual feel with neither Bayern Munich nor Real Madrid in the hat, the first time both European giants have failed to reach the last eight since 2005-06.
Barcelona, who are in the last eight for the 12th successive season, will be away in the first leg after UEFA switched the order to avoid United's home match clashing with Manchester City, who host Spurs in their second leg.
Ajax, once a major European power who struggle to compete financially with clubs from bigger leagues, ousted Real Madrid in the last 16 and their tie against Juventus will be a repeat of the 1996 final, which the Serie A club won on penalties.
They also met in the final of the old European Cup in 1973 with the Dutch side winning 1-0.
"I'm neither happy nor sad. Ajax eliminated Madrid so they are no joke," said Juventus director Pavel Nedved. "I liked them a lot against Madrid so we will have to be very careful. We will have to face Ajax with great commitment: I expect two great games."
Remarkably, Juventus are unbeaten in their last ten meetings with Ajax, winning five of the last six.