Manchester United have been drawn alongside PSG and RB Leipzig in the Champions League group stage.
PSG lost in last year's final to Bayern Munich after eliminating Leipzig at the semi-final stage. They are joined by Turkish champions Istanbul Basaksehir.
Chelsea will play Europa League winners Sevilla, Krasnodar and debutants Rennes.
2019 Champions Liverpool have been put with Ajax, Atalanta and Danish side Midtjylland.
In Group G, Lionel Messi and Cristiano Ronaldo will face off after Barcelona drew Juventus.
Real Madrid and Inter Milan will be another blockbuster clash in Group B.
Manchester City enjoyed a relatively good draw with Porto, Marseille and Olympiakos.
Group-stage draw in full:
Group A: Bayern Munich, Atletico Madrid, Salzburg, Lokomotiv Moscow
Group B: Real Madrid, Shakhtar Donetsk, Inter Milan, Borussia Monchengladbach
Group C: Porto, Manchester City, Olympiakos, Marseille
Group D: Liverpool, Ajax, Atalanta, Midtjylland
Group E: Sevilla, Chelsea, FK Krasnodar, Rennes
Group F: Zenit St Petersburg, Borussia Dortmund, Lazio, Bruges
Group G: Juventus, Barcelona, Dynamo Kyiv, Ferencvaros
Group H: Paris St-Germain, Manchester United, RB Leipzig, Istanbul Basaksehir