It was the Stags' first win in 10 league matches and was achieved thanks to three goals in six second-half minutes.
The visitors arrived knowing a win could get them into the play-off positions.
But the struggling Stags settled their nerves with a sixth minute strike from Giles Coke - his third goal in five games - and dominated the first half.
Mansfield then weathered a spell of pressure early in the second half before it started raining goals.
The result strengthened caretaker-manager Peter Shirtliff's claims to the job full-time and, after so many defensive howlers in recent games, the clean sheet will have pleased him as much as the goal glut.
Stags began well and went ahead on six minutes when David Walton could only half clear a throw and Coke was there 20 yards from goal to bury a superb volley into the top right-hand corner.
Simon Brown should have added a second on nine minutes when Stephen Dawson looped a superb ball over the defence to the far post where he sliced his finish wide from close range.
Kevin Pressman was forced into his first real save of the night on 54 minutes as he got behind Colin McMenamin's header from a Jay Denny cross.
Mark Stallard pulled a shot well wide soon afterwards as the visitors enjoyed their best spell of the night.
However, Brown should have made it 2-0 on 61 minutes. Jake Buxton hoisted a cross to the far post, Richie Barker headed it back across goal and Brown, completely on his own five yards from goal, somehow managed to head his finish wide.
But the second goal did arrive on 65 minutes. Barker turned powerfully in the box and threaded a pass to Brown on the byline. He drilled a low ball across the face of goal and Adam Rundle was there to turn it home from point blank range.
Four minutes later it was 3-0. Brown robbed Neil Sorvel just outside the box. He found Rundle who took the ball on before seeing his low shot parried by Joe Hart but he was helpless as Barker tucked away the loose ball.
Two minutes later it was 4-0. Buxton crossed from the right touchline and Gus Uhlenbeek controlled before lashing home his first goal for the club under the keeper from 10 yards to seal a great night.