Bayern goalkeeper Manuel Neuer stopped spot-kicks from Cristiano Ronaldo, who had given Real an early 2-0 lead in the semi-final second leg, and Kaka in the shootout before Bastian Schweinsteiger struck the decisive penalty to send the Germans through to the title match to be played at their own Allianz Arena on May 19.
Bayern coach Jupp Heynckes, who won the Champions League with Real in 1998, revelled in the German club's unexpected but deserved triumph at his former stomping ground in the Spanish capital, while Mourinho was left to ponder his side's second consecutive elimination at the last-four stage.
Real's latest setback in Europe's elite club competition is a huge blow for the combative Portuguese and club president Florentino Perez, who has spent hundreds of millions of euros chasing the elusive 'decima', or 10th continental title.
It also left Spain in a state of shock after Chelsea survived the dismissal of captain John Terry and fought back from two goals down to send holders Barcelona crashing out 3-2 on aggregate in their semi-final second leg on Tuesday.
"We lost, we are sad and they are happy but that's football," Mourinho told Spanish television. "Football is like that and whoever does not understand that can't be part of it."
After a disastrous start, Bayern showed considerable nerve to get back into the match following Ronaldo's double inside the first 14 minutes and Arjen Robben levelled to make the score 2-1 on the night and 3-3 on aggregate.
Ironically, Ronaldo's opener in the sixth minute was a confidently taken penalty, his 25th successive success from the spot.
A pulsating first half with chances for both sides fell away after the break as with extra time and possibly penalties looming the two European heavyweights curbed their attacking instincts for fear of committing a fatal error.
A well-drilled Bayern were more than a match for Real, both sides striking nine shots on target, and played some patient and controlled football that frustrated the home fans.
"It was a magnificent game and great penalty shootout," a beaming Heynckes told reporters.
"We didn't want the first 15 minutes, to concede one and then two goals especially here because everyone knows what it is like, but after that I think we dominated. Over the 120 minutes I think we deserved it."
With the clock ticking towards midnight local time and the Real faithful urging on their team, the two sides lined up for the shootout before Neuer stunned the stadium and the hundreds of millions watching around the world by leaping low to his right to deny former World Players of the Year Ronaldo and Kaka.
Iker Casillas kept Real's hopes alive by saving efforts from Toni Kroos and Philipp Lahm but Sergio Ramos skied his penalty over the bar and Schweinsteiger rifled the Bavarians through before tearing off his shirt and racing to the corner, where he was swallowed up in a throng of his ecstatic team-mates.
"I have not witnessed something like that in 40 years of professional football," said Bayern CEO Karl-Heinz Rummenigge.
"This tops everything we experienced in the 70s and 80s. I am very happy and very proud. That was top quality football."
The home side had quickly cancelled out Bayern's 2-1 first-leg victory when Ronaldo netted his penalty after a handball in the area and the Portuguese produced a smart finish from the edge of the box to put Real in the driving seat.
However, Bayern pulled a goal back when Robben also netted from th
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.