City's new manager, who twice won the competition during his illustrious spell in charge at Barca, guided City into the group stage with victory over Steaua Bucharest in the play-off round.
The two sides were drawn together in Group C alongside Borussia Monchengladbach and Scottish champions Celtic.
Surprise Premier League winners Leicester came out in Group G at UEFA's draw with Porto, Bruges and Copenhagen.
Arsenal will face Paris St Germain, Basel and Bulgarian side Ludogorets in Group A, with Tottenham playing CSKA Moscow, Bayer Leverkusen and Monaco in Group E.
Holders Real Madrid will meet Borussia Dortmund, Sporting Lisbon and Legia Warsaw while last year's beaten finalists Atletico Madrid were pitted against Bayern Munich, PSV Eindhoven and Rostov.
Yet there was no doubting the most eye-catching group, with Guardiola given a trip back to the Nou Camp.
The 45-year-old also won La Liga three times in four years at the Barca helm.
But while he will be highly familiar with the club, many of City's players will also know them well.
The Spanish champions beat City at the last-16 stage in both 2014 and 2015 while goalkeeper Claudio Bravo has just completed a move from Barca to Guardiola's new side.
City also played Monchengladbach in the group stage last year en route to the semi-finals.
Their fourth opponents, Celtic, reached the group stage via a tortuous qualifying route involving ties against Lincoln Red Imps, Astana and Hapoel Beer Sheva.
Arsenal are playing in the Champions League for a 19th successive season while Spurs are returning for the first time since the 2010-11 campaign.
The UEFA Champions League draw is as follows:
PSG, Arsenal, Basel, Ludogorets
Benfica, Napoli, Dynamo Kiev, Besiktas
Barcelona, Manchester City, Borussia Monchengladbach, Celtic
Bayern Munich, Atletico Madrid, PSV, Rostov
CSKA Moscow, Bayer Leverkusen, Tottenham Hotspur, Monaco
Real Madrid, Borussia Dortmund, Sporting, Legia Warsaw
Leicester, Porto, Club Brugge, FC Copenhagen
Juventus, Sevilla, Lyon, Dinamo Zagreb