Paris Saint-Germain will take on Manchester City in one of the biggest ties of the Champions League group stage, while holders Chelsea will face Juventus and Barcelona and Bayern Munich will also square off following Thursday's draw in Nyon.
In a draw that produced a host of blockbuster clashes, Inter's meeting with Real Madrid in Group D also stood out.
Manchester United, meanwhile, will have the opportunity to gain revenge over Villarreal after being paired with their Europa League final vanquishers.
The blockbuster clashes
Having been so closely linked with a move to City prior to choosing PSG, now Messi will lead his new employers against the Premier League champions in Group A, with RB Leipzig and Club Brugge also drawn alongside the two giants.
The Argentine will also enjoy a reunion with former Barcelona coach Pep Guardiola, while he might even face off against Cristiano Ronaldo should the Portugal star join City from Juventus.
For now, though, Ronaldo will be Chelsea's problem, as the reigning champions were drawn against Juventus, Zenit and Malmo in Group H.
Liverpool, meanwhile, face a tough route to the knockout stages.
The Reds must take on Atletico Madrid, Porto and AC Milan in Group B.
United might be slightly happier with their group, with Villarreal joined by Atalanta and Young Boys of Switzerland in Group F.
The draw in full
Group A : Manchester City, PSG, RB Leipzig, Club Brugge
Group B : Atletico Madrid, Liverpool, Porto, AC Milan
Group C : Sporting, Borussia Dortmund, Ajax, Besiktas
Group D : Inter, Real Madrid, Shakhtar Donetsk, Sheriff
Group E : Bayern Munich, Barcelona, Benfica, Dynamo Kyiv
Group F : Villarreal, Manchester United, Atalanta, Young Boys
Group G : Lille, Sevilla, Red Bull Salzburg, Wolfsburg
Group H : Chelsea, Juventus, Zenit, Malmo