Liam Lawrence struck a dramatic late winner as Mansfield claimed a vital win in a non-stop local derby.
Lawrence headed home a free kick in the 94th minute to snatch the points just when the game seemed to be heading for a draw.
Marcus Ebdon had earlier given Chesterfield the lead with a 38th minute penalty but Craig Disley equalised just five minutes later.
Ex-Stags man Shayne Bradley then saw red for an off the ball incident before Lawrence's late show earned his side a deserved victory.
The early kick-off time seemed to affect both sides, as the opening stages were very scrappy.
The first chance for either side arrived in the 17th minute when young Mansfield striker Chris Beardsley headed wide from 12 yards.
Rhys Day was then presented with a good shooting opportunity for the visitors but hooked a half volley well over from the edge of the penalty area.
Mansfield keeper Kevin Pilkington was finally troubled in the 20th minute when Steve Payne fired a low long-range effort inches wide, and Pilkington was on hand three minutes later to push Robert Edwards' rising shot over.
But the home side moved ahead seven minutes before the break when Ebdon stroked a penalty into the corner of the net after Matthew Gadsby had handled a cross.
However, the Stags were level only five minutes later when Disley superbly controlled Lawrence’s cross before beating Ben Williams with a neat finish.
The Stags almost took the lead just after the restart when Day nodded Wayne Corden's flag kick agonisingly wide but the game reached boiling point in the 70th minute with the dismissal of former Mansfield striker Bradley.
The Chesterfield hitman - who was released by Mansfield last October - received his marching orders for an off the ball clash with Gadsby.
Then eight minutes later the visitors nearly made the most of their advantage when Lawrence chested the ball down in the area and smashed an effort against the inside of the post.
But the young midfielder was not to be denied and with the seconds ticking by he stole in unmarked at the back post to nod a Jamie Clarke free-kick into the bottom corner to send the thousands of Mansfield fans behind the goal wild.
After the game Stags player-boss Keith Curle said: “It was a typical derby game.
“It had a little bit, well actually a lot, of everything.
“We started okay but we weren't as attacking as we would have liked.
“The penalty decision which I thought was harsh rocked us.
“But the response of the players after going a goal down was excellent.
“In the past heads might have dropped but there has been a change in attitude in recent weeks.
“They have got the belief back as a group of players and as a club.
'I think we definitely deserved to win. I think the harder you work the luckier you get and we’ll stand toe to toe with anybody in this division and give them a match.â€