Mahrez gave City the lead with a fine free-kick after 53 minutes of Wednesday’s third-round tie before Alvarez tapped in the second five minutes later at the Etihad Stadium.
Chelsea’s impressive youngster Lewis Hall twice brought good saves out of Stefan Ortega but City, bidding to win the competition for a seventh time in 10 seasons, were good value for their victory.
Further good news for the home side – and potentially England – was that midfielder Kalvin Phillips had a 40-minute run-out.
Phillips had been out since undergoing shoulder surgery in September and the game was his last opportunity to prove his fitness before England boss Gareth Southgate names his World Cup squad on Thursday.
Phillips’ introduction allowed City to take and maintain control after a tame first half.
With both sides making seven changes, the game lacked Premier League intensity. With Erling Haaland, Phil Foden and Kevin De Bruyne on the City bench it was left to the likes of Jack Grealish and Mahrez to provide the spark.
Grealish went close early on with a shot that curled narrowly wide before he was felled just outside the area by Kalidou Koulibaly.
The resulting free-kick from Ilkay Gunodgan came to nothing but the German later teed up Alvarez only for the Argentinian to miss the target.
Grealish had another opportunity when he cut inside to force a save from Edouard Mendy but, although City controlled most of the possession, Chelsea also threatened.
City goalkeeper Ortega needed to be alert after the ball rebounded off team-mate Rico Lewis before he later saved from Christian Pulisic.
Hall, an 18-year-old making only his second Chelsea start, almost made a name for himself with a brilliant run and step to wrong-foot Lewis but Ortega saved with his feet.
City moved up a gear after the break as Grealish and Mahrez began to get the bit between their teeth.
The introduction of Phillips and Bernardo Silva after 50 minutes also injected some energy.
Grealish brought two brilliant saves out of Mendy before Trevoh Chalobah fouled Mahrez on the edge of the area and paid the price as the Algerian curled a free-kick over the wall to score.
City quickly doubled the lead with Mahrez again involved, this time controlling beautifully before shooting across goal. Mendy parried but Alvarez was on hand to snap up the rebound.
Chelsea responded well and Hakim Ziyech should have done better with an effort he slashed wide and Hall was unlucky to be denied again when Ortega got a strong hand to his low strike.
Chelsea boss Graham Potter turned to former City forward Raheem Sterling and the home side had a moment of alarm when Sergio Gomez headed against his own post. Pulisic also forced the ball into the net but the flag was raised.