Mainz started highly motivated against the Champions League finalist, knowing that a win would lift them out of the relegation zone on Saturday night.
The hosts pressed Dortmund onto the back foot as Nadiem Amiri rattled the crossbar in the seventh minute before Silvan Widmer's header hit the left post moments later.
Mainz broke the deadlock with 12 minutes gone when Leandro Barreiro exchanged a one-two with Widmer before drilling the ball into the bottom left corner past goalkeeper Alexander Meyer.
Meyer remained in the thick of things and helped Mainz to double the lead as he unleashed an offside free kick into the path of Lee Jae-sung, who made no mistake to send the ball into the roof of the net in the 19th minute.
Relegation-threatened Mainz pressed relentlessly and tripled its lead four minutes after Lee benefitted from Barreiro's good build-up work and assist.
Mainz should have extended the lead, but Lee and Barreiro lacked in accuracy in front of the target. And Dortmund posed absolutely no threat to the host's well-positioned bulwark, reports Xinhua.
In the 52nd minute, Edin Terzic's man thought they had reduced the deficit through Youssoufa Moukoko but the goal of the German international was ruled offside by VAR.
With the result, Mainz have extended their unbeaten run to eight games, and Dortmund stay on the 5th spot.
"One team fought to win, and another just wanted to play football. We were always late, for all duels. That made the difference today. This is a tough defeat that hurts us a lot. But it is more than deserved. It's a very bitter evening for us," said Dortmund coach Terzic.
In the other matches on Saturday, relegation-threatened Cologne secured a 3-2 victory over Union Berlin to boost their survival hopes.
Substitute Benjamin Sesko converted a penalty to secure fourth-placed Leipzig a 1-1 stalemate with Werder Bremen.
Wasteful Freiburg shared the spoils with Heidenheim following a 1-1 draw, and Eintracht Frankfurt held Borussia Monchengladbach 1-1 to maintain their chances for a top-six finish.
On Friday, Stuttgart edged Augsburg 1-0 thanks to Serhou Guirassy's sole goal, helping the Swabians to leapfrog Bayern Munich in the standings.