Roy Makaay put Bayern ahead with just 10 seconds on the clock against Real Madrid at the Allianz Arena.
The dominant home side failed to take an array of gilt-edged chances, which forced them to sweat until Lucio struck midway through the second half.
Mark van Bommel and Mahamadou Diarra were both dismissed before Ruud van Nistelrooy converted an 82nd-minute penalty, but it was only a consolation as Bayern held on to a 2-1 win, which was enough to take them through on away goals.
It was a lightning quick start for Bayern; Roberto Carlos failed to control a pass from the kick-off and Hasan Salihamidzic raced forward. The Bosnian fed Makaay who swept past Iker Casillas from 15 yards.
There was more to come too as the home side went in search of a second.
Roberto Carlos’ poorly hit free-kick didn’t make it further than Makaay, who instantly sent Lukas Podolski racing into the Madrid half with the last defender already in his wake. The Germany international did not have the same composure as Makaay, though, and his weak effort was easily saved.
Real showed their first signs of life as the first half drew an end and both Guti and Van Nistelrooy came close before Raul found the side-netting with a rasping shot.
Five minutes into the second half, the visitors created their best chance of the game with half-time substitute Antonio Cassano firing over the bar from 10 yards.
Capello’s side had finally realised the severity of the situation and Oliver Kahn, who was a spectator for much of the first half, was called into action to palm Van Nistelrooy’s header away.
However, the pendulum soon swung back in the hosts’ favour, and this time they took full advantage.
Lucio, who scored at the Bernabeu a fortnight ago, finally put Bayern two up by heading Sagnol’s 66th-minute corner past Casillas.
But the game was not over and there was still more drama to come as referee Lubos Michel awarded a controversial penalty when Robinho tumbled.
Before Van Nistelrooy could take the spot-kick, though, Diarra and Van Bommel were both shown second yellow cards as they jostled on the edge of the area. With both teams reduced to 10 men, Van Nistelrooy converted from 12 yards to set up a nail-biting conclusion.
Kahn, van Buyten, Lahm, Lucio, Sagnol (Görlitz 85), Schweinsteiger, Hargreaves, Salihamidzic, van Bommel, Podolski (Demichelis 87), Makaay (Pizarro 67).
Casillas, Helguera, Carlos, Ramos, Gómez, Diarra, Emerson (Guti 32), Gago (Robinho 75), Higuaín (Cassano 45), González Blanco, van Nistelrooy.
Lubos Michel (Slovakia).