Dortmund, undone 2-1 at Wembley and distant runners-up to champions Bayern in the Bundesliga, deprived new Bayern coach Pep Guardiola of his first piece of silverware and inflicted his first loss since the former Barcelona boss took over from Jupp Heynckes.
The home side took a sixth-minute lead, largely due to a mistake by Bayern keeper Tom Starke, who after a poor clearance was unable to keep out Marco Reus’s diving header.
Dortmund thought they’d gone two goals clear minutes later only for striker Robert Lewandowski’s effort to be ruled offside.
Bayern showed plenty of attacking intent without reward in an evenly matched first half as Arjen Robben, Thiago Alcantra and Mario Mandzukic were kept at bay by Dortmund’s defence.
At the restart Dortmund coach Jurgen Klopp made a straight switch in midfield, Sven Bender replaced by Sebastian Kehl.
The match, in front of a sell-out 80,645 crowd, then exploded, with three goals in the space of as many minutes.
First up was Robben, whose late intervention had settled the Champions League final, levelled with a header by the far post after a fine cross from Philipp Lahm.
Seconds later, down at the other end, an almighty mix up resulted in Bayern defender Daniel van Buyten’s back header slipping past a distraught Starke, standing in for the injured Manuel Neuer, to put Dortmund back in front.
And then to Bayern’s disbelief Dortmund stretched their advantage when Ilkay Gundogan curled a shot from the edge of the box into the bottom corner.
The game had barely time to draw breath when Robben gave fresh hope to Bayern after the hour, the Dutch star linking up well with Lahm for the game’s fourth goal inside ten minutes.
Borussia’s new signing, attacking midfielder Pierre-Emerick Aubameyang from Saint Etienne, made his debut in place of Jakub Blaszczykowski for the closing 20 minutes.
Thomas Muller hit the bar for Bayern but Dortmund snatched a fourth via Reus, set up by Aubameyang, the pulsating win giving Klopp’s side a timely boost ahead of the start of the new Bundesliga campaign on August 9.