- Kevin De Bruyne (2')
- Gabriel Jesus (11')
- Phil Foden (53')
- Bernardo Silva (74')
- Karim Benzema (33', 82' Pen)
- Vinícius Júnior (55')
Madrid striker Karim Benzema netted a superb brace, including a stunning Panenka penalty, but it was not enough to keep pace with City's free-scoring attack.
- Don't have ESPN? Get instant access
Benzema struck a well-taken volley later in the first half to snatch a goal back, but City's Phil Foden scored a header in the opening minutes of the second half to restore their two-goal lead.
Carlo Ancelotti's side proved earlier in this season's Champions League they can lead a comeback, and Vinicius Jr. had Madrid fans dreaming when he raced down the left flank and scored, cutting the deficit back to one.
Pep Guardiola's side looked dominant throughout and midfielder Bernardo Silva gave City some breathing room once again when he powered a strike from just inside the box, but a handball from defender Aymeric Laporte handed Benzema a penalty, which he sublimely converted with a dinked finish over Ederson.
"For our fans all around the world and for Manchester City, we are so proud," Guardiola told BT Sport.
"What we have done with the ball and without the ball, creating chances and chances, I can't ask anything else. I say to the players to rest. Both teams want to attack and have the quality to play. The football was a fantastic spectacle.
"Congratulations to [Real coach] Carlo [Ancelotti] and his team as they are so good. At the same time, we saw ourselves that we can be at their level."
The two sides will meet again in the return leg at the Santiago Bernabeu on May 4 for a place in the final.
"We're never happy with a loss," Ancelotti told Spanish media outlet Movistar after the match.
"There are 90 minutes more to make the difference at the Bernabeu. The next game will be different. But I'm very happy with the attitude of the team, against a good team, no a great team with a great coach. It's very complicated to play here against City."
City came firing out of the blocks and struck first, with Riyad Mahrez's superb cross rewarded as De Bruyne scored with a flicked header to give the home side an early lead.
According to ESPN stats and information research, De Bruyne's goal at 1:35 is the quickest ever scored in a Champions League semifinal.
Jesus, who is enjoying a fine vein of form in front of goal, doubled City's lead on 11 minutes, turning Madrid defender David Alaba on the edge of the box before slotting past opposing goalkeeper Thibaut Courtois.
City continued to take full advantage of Madrid's sloppy defensive display. Foden had a glorious opportunity to further extend the home side's lead when De Bruyne played a perfectly weighted pass to send him through on goal, but the England international's effort rolled wide.
But Madrid struck back on 34 minutes through Benzema, who again showed his pedigree as he made his 600th appearance for the club. The 34-year-old called for defender Ferland Mendy to deliver a cross to his head, but when the ball arrived at waist-height just inside the 18-yard-box, Benzema adapted and guided a side-footed volley inside the far post.
City almost enjoyed a similarly fruitful start to the second half as Mahrez beared down on goal just over a minute after the restart but saw his curled effort cannon off the post. The ball fell to Foden for a follow up, but Dani Carvajal made a crucial block on the goal line.
Foden could not be denied much longer though as he took advantage of a floated cross from replacement Fernandinho and powered a header into the back of the net.
Vinicius Jr. brought Madrid back into the tie when he picked up the ball at the halfway line and drove forward at pace until he reached the City penalty area where he calmly finished.
Despite carrying just a one-goal lead, City continued to press ahead and it paid off. Oleksandr Zinchenko was upended on the edge of the box, causing Madrid's players to stop as they seemed to expect a foul, but Silva played on, picking up the ball before firing into the top corner.
Laporte's handball came as he challenged Benzema for a cross in the final stages of the game, and the France international displayed his class as he chipped home, his 14th goal of the competition.
"Manchester City are a team that play very good football," Ancelotti added. "We competed... the good thing is we scored three but the bad thing is we conceded four."
Information from Reuters was used in this report.
- Istvan Kovacs