Jonathan Burkardt and Robin Quaison scored one apiece in the first-half, while Robert Lewandowski netted a stoppage-time consolation on his return from injury for the away side.
The Bavarians were second best for much of the game as the 05ers smashed their mighty visitors off the park with an exuberant attacking display, particularly in the opening stanza.
Despite the loss, Bayern Munich remain 10 points clear at the top of the league table and could seal Meisterschale with a victory next week.
Here are the five talking points from the clash:
#1 Mainz catch Bayern Munich off guard with fast start
Mainz had been in brilliant form of late and needed just three minutes to set Bayern Munich back as a mix-up between Jerome Boateng and Alphonso Davies allowed Jonathan Burkadt to fire home an early opener.
The goal set the tone for the first half, as Die Nullfünfer continued to press high, leaving the holders on tenterhooks. The likes of Danny Latza and Danny da Costa even hit the post in the next few minutes.
The home side looked so dangerous that a second goal seemed just around the corner, and it arrived in the 37th minute. Even though Quaison scored from a set-piece, it was merely a culmination of Mainz's dominance until that point.
#2 Lewandowski returns with a whimper but salvages a late goal
Robert Lewandowski's return to Bayern Munich tonight was more of a whimper than a wham. The Pole wasted a huge chance early on and was left devoid of service for most of the match.
Having been out for the last four weeks with an injury, he was understandably below his best, lacking pace and leaving a lot to be desired with his pressing.
Yet, somehow, Lewandowski managed to find the back of the net at the death, pouncing on a defensive mistake by Mainz and coolly chipping over their goalkeeper into an empty net.
Some believe he was rushed back into the side, keeping his ambition of surpassing Gerd Muller's record in mind. If that's indeed true, then the gamble certainly paid off, even if the star had to wait till the last minute for his goal.
#3 Should Leon Goretzka have been sent off?
There was one controversial moment in the first half involving Leon Goretzka when Mainz felt he deserved a second yellow card.
Just a few seconds after the Bayern Munich midfielder was booked for a foul, he seemed to hack down da Costa in seemingly another punishable offense, and the Mainz players were incensed to see the match official let Goretzka off the hook.
However, replays showed that the 26-year old had made contact with the ball first, and the collision was merely a result of both players being in full motion. So, perhaps, the referee was right in not booking Goretzka.
#4 Boateng and Alaba in a shambles
Bayern Munich had their backs to the wall in that crazy first half with their defense in complete shambles. The centre-back duo of Jerome Boateng and David Alaba were in no man's land and looked like a pair of non-league players.
There was virtually no communication between the players that left enormous gaps, allowing the likes of Quaison and Burkardt to wreak havoc through the middle. Boateng even flicked a header into the latter's path which led to the first goal.
Alaba, in particular, was awful in positioning and gave the ball away in tense moments a few times. He's been well below his best this season and turned another stinker tonight.
No wonder Bayern Munich are keen to offload him in the summer.
#5 A false hope for Leipzig?
Bayern Munich remain 10 points clear at the top of the table after this defeat, but RB Leipzig have the chance to reduce the gap to seven tomorrow with a victory against Stuttgart.
However, with just three more games remaining in the season after this matchday, will that be enough for the Red Bulls to close the gap?
It's true that the Bavarians have looked shaky lately, but conceding such a healthy lead at this juncture of the season seems unimaginable. Especially with Lewandowski now back in the side.
In all honesty, tonight's defeat has merely left their champagne on the ice, as Bayern Munich need just three more points to secure Meisterschale, which they can in the very next game with a victory against Borussia Monchengladbach.