Kane's 50th goal of the season puts Bayern back in front on aggregate
At a glance
Five goals scored in a blistering first half, with Arda Guler opening scoring for Real after 35 seconds
Aleksandar Pavlovic equalises before Guler free-kick makes it 2-1 to Spaniards on the night
Bayern level again through Harry Kane but Kylian Mbappe levels tie on aggregate just before break
Real's Eduardo Camavinga shown second yellow four minutes from time
Late Luis Diaz and Michael Olise goals make it 6-4 to Bayern on aggregate, while the substituted Guler is sent off after full-time
Bayern Munich set up a Champions League semi-final date with holders Paris St-Germain after they came out on top of a seven-goal thriller against Real Madrid.
Five goals were scored in a blistering, breathless first half of a quarter-final second-leg cracker, before the game switched to a tactical battle after the break with both sides slowing down the tempo.
It looked like extra time would be needed to settle the outcome, but Real Madrid substitute Eduardo Camavinga was shown a second yellow card for time-wasting four minutes from time following a foul by the French midfielder on Harry Kane.
With a minute left, Luis Diaz delivered a decisive blow with his 24th goal of the season.
The former Liverpool forward played a one-two with Jamal Musiala before sending a curling strike into the top corner via a slight deflection.
After losing the first leg 2-1, Real led three times at the Allianz Arena with Arda Guler scoring twice, but Kane netted his 50th goal of the campaign as Bayern responded each time.
They ensured there was to be no comeback from the 15-time European champions when Michael Olise curled in a fourth in added time to seal a 4-3 win on the night and 6-4 success on aggregate.
Chaos and quality as Bayern hold off Real charge
The knockout stages often throws up thrilling matches and with the quality of players within the Bayern and Real ranks it was always likely this last-eight encounter would deliver.
That was certainly the case in a pulsating opening period, with Real having clearly arrived in Munich determined to keep alive their hopes of winning the competition for a 16th time.
After their defeat in Madrid, it took Real just 35 seconds to level matters on aggregate when veteran Bayern keeper Manuel Neuer hit a poor clearance straight to Guler, who struck a superb first-time effort from 25 yards into the empty net.
But the German champions levelled to restore their advantage just five minutes later when Aleksandar Pavlovic headed Joshua Kimmich's corner in from practically on the goalline as visiting keeper Andriy Lunin was left stranded.
The fast-paced tempo continued as a superbly-timed challenge by Dayot Upamecano denied Vinicius Jr, but Real made it 2-1 in the 29th minute when Guler fired in lovely free-kick that was pushed into the net by the scrambling Neuer.
The Turkish international had not scored in the Champions League until tonight.
Kane and Mbappe then made their inevitable contributions before half-time.
The England captain was left unmarked to curl home a composed finish to make it 2-2 in the 38th minute, before Frenchman Mbappe drove in Vinicius Jr's pass four minutes later - his 15th goal in 11 Champions League games - to level the tie on aggregate again.
The second half struggled to match the chaos and quality of the first, but there was drama in the closing minutes as Bayern overcame Real's spirited effort.
Camavinga, who only came on in the 62nd minute, was dismissed for a second booking for walking off with the ball and not allowing the hosts to take the free-kick after his foul on Kane.
Real were rattled and their 10 men couldn't hold on as the late goals from Diaz and Olise kept alive Bayern's hopes of a Treble this season.
The Spanish side were left aggrieved after the final whistle and Guler, who had already been substituted, was shown a red card on the sidelines.
'What a start!' - Guler scores in opening minute after 'nightmare' from Neuer
Pavlovic goal puts Bayern back ahead in tie
Guler scores second as Neuer fails to keep freekick out
Mbappe rounds off blistering counter to bring Real level on aggregate again
'He's done it!' - Diaz scores stunner to give Bayern late lead
Olise curler seals Bayern win over Real Madrid
Player of the match
After the opportunity to rate players has closed, the score displayed represents the average from all the submissions by BBC Sport users.