Lionel Messi's new club Paris St Germain will play Manchester City, managed by the Argentine's former Barcelona coach Pep Guardiola, after being drawn together in Champion's League Group A on Thursday.
Messi joined Qatar-owned PSG, who will also face Bundesliga side RB Leipzig and Belgium's Club Brugge, from Barcelona this month.
Abu Dhabi-owned City lost last season's final to Premier League rivals Chelsea, who were drawn in Group H against Juventus, Zenit St Petersburg and Malmo.
Real Madrid will play Inter Milan, Shakhtar Donetsk and Moldova's Sheriff Tiraspol in Group D while Spanish champions Atletico Madrid and Liverpool were together in Group B with former winners Porto and AC Milan.
Barcelona were drawn in Group E with Bayern Munich, Benfica and Dynamo Kyiv.
Manchester United will have another meeting with Spain's Villarreal, a repeat of this year's Europa League final, in Group F along with Atalanta and Young Boys.
The following is the draw for the Champions League group stage which took place in Istanbul on Thursday:
GROUP A: Manchester City, Paris St Germain, RB Leipzig, Brugge
GROUP B: Atletico Madrid, Liverpool, Porto, AC Milan
GROUP C: Sporting CP, Borussia Dortmund, Ajax, Besiktas
GROUP D: Inter Milan, Real Madrid, Shakhtar Donetsk, Sheriff
GROUP E: Bayern Munich, Barcelona, Benfica, Dynamo Kyiv
GROUP F: Villarreal, Manchester United, Atalanta, Young Boys Bern
GROUP G: Lille, Sevilla, Salzburg, Wolfsburg
GROUP H: Chelsea, Juventus, Zenit St Petersburg, Malmo
The group stage begins on September 14.