In what was a topsy-turvy game full of chances for both sides, it was Borussia Dortmund who took the lead through Marco Reus, who diverted Raphael Guerreiro's cross past Manuel Neuer in the Bayern goal.
Bayern leveled the contest almost immediately after that though, as David Alaba's free-kick deflected off Thomas Meunier and past Roman Burki.
Bayern took the lead three minutes after the restart, as Lucas Hernandez's cross into the box was met by a superb Robert Lewandowski header, after the Pole had darted across Mats Hummels.
Lewandowski then turned provider Leroy Sane, and the German made no mistake with an accurate strike past Burki.
Erling Haaland then breathed life back into the contest, with a sensationally taken goal, which should have been the beginning of a Dortmund comeback. But those hopes were fluffed by Reus, who skied a Guerreiro cross with Neuer's goal at his mercy.
Lewandowski also had two goals disallowed in the game for offside, after VAR had been called in.
Here's how each player fared for both teams.
Borussia Dortmund Player Ratings
Roman Burki - 6/10
Burki really could not have done much about any of the Bayern goals. The first goal was deflected, and the other two were precise finishes that left him with no chance.
Thomas Meunier - 5/10
The Belgian full-bakc did not have a great game for Dortmund. Meunier was sometimes caught in two minds with his approach to the game. In the end, he didn't get forward effectively, nor did he defend well enough. He should have gone out to Lucas Hernandez to block the cross for Lewandowski's goal.
Manuel Akanji - 6/10
Akanji had a great battle with Lewandowski throughout the game. The Swiss didn't make any blatant mistakes, and generally had the answers to the questions that the Pole posed to him.
Mats Hummels - 5/10
A defender as experienced as Hummels should anticipate the dart that Lewandowski made for his goal. A lot of Dortmund's defensive organisation was faulty, and that was down to Hummels.
Raphael Guerreiro - 8/10
The Portuguese was easily Dortmund's best player on the night. He was assured in possession, defended well, and made good decisions in the final third. Guerreiro had two assists on the night, as he set up both Reus and Haaland.
Axel Witsel - 5/10
Witsel played a difficult role in this game, having to screen Bayern's runners from deep. He had a tough time with that, but he was even worse with the ball at his feet, with too many misplaced passes.
Thomas Delaney - 4/10
The Dane was taken off early in the second half to be replaced by Jude Bellingham. Delaney had no impact on the game, and was getting easily played around by Bayern.
Jadon Sancho - 6/10
Sancho showed flashes of the ability that he has, but was nowhere near consistent enough with that. He played some terrific passes into the box for the likes of Haaland, but was also sometimes wasteful in possession.
Marco Reus - 5/10
Despite the goal, Reus had a horrible game. The goal was really his only useful contribution to Dortmund in the first half. His night was summed up by the late miss when, with Neuer's goal at his mercy, he skied his shot.
Giovanni Reyna - 6/10
Like Sancho, Reyna only managed to show glimpses of his ability at different points in the game. He had a great chance after a Bouna Sarr mistake, but shot tamely at Neuer.
Erling Haaland - 7/10
The big Norwegian tried as hard as anybody in yellow did. Uncharacteristically, Haaland was sometimes found a bit wanting for conviction in the box. His goal was brilliantly taken though. He had a lot of work left to do after receiving the ball from Guerreiro, but his touches were impeccable before he went around Neuer to finish.
Jude Bellingham - 6/10
Bellingham offered Dortmund a lot more in possession than Delaney did, but that was at the cost of leaving Bayern more space on the counter-attack, which was what led to Sane's goal.
Thorgan Hazard - 5/10
He nearly had a spectacular introduction to the game, but his shot was straight at Neuer.
Julian Brandt - 5/10
Brandt did have a few opportunities to play the ball into the box, but none of those were of any big threat to Bayern.