Madrid made an impressive start in the Spanish capital, with Cristiano Ronaldo scoring from the spot before stroking home a close-range finish to put José Mourinho’s side ahead for the first time in the tie after just 15 minutes.
But Bayern responded in the 27th minute when Arjen Robben squeezed his penalty past Casillas after Madrid defender Pepe had been penalised for bringing down Mario Gómez in the area.
Neither side could be separated in a tight second half, although Gómez spurned a glorious opportunity to seal a memorable aggregate victory in normal time.
A relatively even game was eventually settled on penalties after extra-time. Bayern goalkeeper Manuel Neuer denied Ronaldo and Kaká, while Sergio Ramos missed Madrid’s fourth spot-kick to allow Bastian Schweinsteiger to wrap up a famous Bavarian victory in Madrid.
“We played a good game,” Casillas said. “The penalties are about luck and that is just what it is. Bayern played well and we must wish them luck.
“I have to thank the fans here who understand the setback we’ve had [tonight] – the penalties are a lottery.”
Bayern’s win sets up a Champions League final date with Premier League side Chelsea on 19 May at the Allianz Arena after Roberto Di Matteo’s side beat Barcelona 3-2 on aggregate on Tuesday night.
Real Madrid boss Mourinho claimed his side looked sapped of energy during the clash. “You have to stay balanced when you win and when you lose,” he said.
“The lads were fantastic, with an incredible mentality against a great team, against a team that last weekend were on holiday.
“We were maybe lacking a bit of freshness. It was a great. We lost, we are sad and they are happy – but that’s football.”
MORE: Man United latest news
MORE: Arsenal latest news
MORE: Chelsea latest news
MORE: Liverpool latest news