Bayern overcame the early loss of Arjen Robben through injury to lead when Joshua Kimmich caught Kaylor Navas with a rasping finish before the half-hour mark.
Zinedine Zidane’s European champions never truly recovered their defensive poise from that point, even after Marcelo clattered home a 44th-minute equaliser.
Full-backs were the heroes in both first-half goals, but an awful error by Bayern left-back Rafinha allowed Asensio, on for the struggling Isco, to hand Madrid a significant second away goal.
Cristiano Ronaldo, who had scored in every match in this season’s competition, had a strike ruled out for handball – an advantage that would have further flattered Zidane’s men after a strangely error-strewn encounter at the Allianz Arena, where Robert Lewandowski’s pursuit of a 40th goal this season went awry in untimely fashion.
Thomas Muller was unable to contort himself to convert Lewandowski’s hooked cross during the opening minute, setting the tone for a frantic start that continued until Robben pulled up.
The Bayern winger made way due to a problem with his right leg and the pace of the game settled following Thiago Alcantara’s introduction.
The first clear chance fell Madrid’s way when Dani Carvajal darted in behind James Rodriguez – playing against his parent club – for Lucas Vazquez’s return flick and shot too close to Sven Ulreich.
There were questions over Ulreich’s opposite number Navas in the 28th minute when Kimmich latched on to James’ incisive pass and clattered past the Madrid goalkeeper at his near post.
Bayern then lost centre-back Jerome Boateng to a hamstring injury, but it was Madrid ailing in defence – Navas rushing out to deny Franck Ribery one-on-one as a heavy touch undermined the veteran Frenchman.
Muller had a shot deflected behind at close quarters by Sergio Ramos and Marcelo’s rasping drive into the bottom-right corner after he seized upon the loose ball from Carvajal’s header certainly came against the run of play.
Lewandowski and Muller had further chances as Madrid floundered under set-pieces in first-half stoppage time and the latter was heroically denied in the goalmouth by a combination of Raphael Varane and Ramos in the 51st minute after Ribery twisted past Casemiro.
Zidane introducing Asensio in place of Isco put Madrid on a clear path of trying to exploit the counter-attack, but that tactic seemed questionable as Muller streamed into space behind Marcelo to cross and his defensive colleagues muddled clear from Lewandowski’s header.
However, the Madrid coach’s call soon looked inspired.