The relegation battlers shocked the title chasers and the win will come as a huge boost to them.
Jonathan Burkardt opened the scoring after the half hour for Mainz and Jean-Philippe Mateta scored from the penalty spot minutes after the break.
Dortmund are second in the table right now but Leipzig are only three points behind. The German giants will be looking to bounce back immediately and win their next game so that they can maintain that gap in second place.
As for Mainz, they are now five points clear of 16th-placed Fortuna Dusseldorf, who came from 2-0 behind after 86 minutes to secure a 2-2 draw at RB Leipzig.
It will be interesting to see if they can beat the drop this season. With just two games remaining, they will have to get a win in their remaining games to ensure their survival.
Dortmund will be thoroughly disappointed with their showing. They went into the game as the favourites and they failed to cope with Mainz’ intensity and desire.
They have very little to play for and perhaps the players lacked motivation.
Bayern Munich have already sealed the Bundesliga title this season.
Borussia Dortmund – Playing Eleven
Bürki – Piszczek (c) (Schmelzer 54′), Can, Hummels – Hakimi, Brandt, Witsel, Guerreiro (Schulz 82′) – Sancho (Morey 77′), Haaland, Hazard
Unused subs: Hitz, Rente, Balerdi, Bakir, Duman, Raschl
Mainz – Playing Eleven
Müller – Baku, St. Juste, Niakhate, Martin (Brosinski 84′) – Kunde (Barreiro 75′), Latza (c) – Burkardt (Öztunali 67′), Boetius, Onisiwo (Ji 84′) – Mateta (Szalai 75′)
Unused subs: Dahmen, Quaison, Mwene, Hack