Manchester City will meet Scottish champions Celtic and manager Pep Guardiola's former club Barcelona in the Champions League group stage.
German side Borussia Monchengladbach will be the other team in Group B.
Premier League champions Leicester will play Porto, Club Brugge and FC Copenhagen in their debut campaign.
Arsenal have been drawn alongside Paris St-Germain, Basel and Ludogorets, with Tottenham facing Monaco, CSKA Moscow and Bayer Leverkusen.
Real Madrib meets German outfit Borussia Dortmund, Portugal's Sporting Lisbon and Legia Warsaw of Poland.
Spanish side Real Madrid beat neighbours Atletico on penalties in last season's final, becoming European champions for a record 11th time.
Full group stage draw:
Group A: Paris St-Germain (France), Arsenal (England), Basel (Switzerland), Ludogorets (Bulgaria).
Group B: Benfica (Portugal), Napoli (Italy), Dynamo Kiev (Ukraine), Besiktas (Turkey).
Group C: Barcelona (Spain), Manchester City (England), Borussia Monchengladbach (Germany), Celtic (Scotland).
Group D: Bayern Munich (Germany), Atletico Madrid (Spain), PSV Eindhoven (Netherlands), Rostov (Russia).
Group E: CSKA Moscow (Russia), Bayer Leverkusen (Germany), Tottenham (England), Monaco (France).
Group F: Real Madrid (Spain), Borussia Dortmund (Germany), Sporting Lisbon (Portugal), Legia Warsaw (Poland).
Group G: Leicester City (England), Porto (Portugal), Club Brugge (Belgium), FC Copenhagen (Denmark).
Group H: Juventus (Italy), Sevilla (Spain), Lyon (France), Dinamo Zagreb (Croatia).