Lee Bonis scored twice in a dominant first-half for the Spireites but Mark Shelton headed one back from a corner to get the Bees, who were unbeaten in six in the league, back into it before the break.
Town came under pressure in the second 45, Zach Hemming saving well from Callum Stead and then Kane Smith hit the post, but Liam Mandeville gave the hosts some breathing space as he added a third with 10 minutes remaining.
The victory moves the Blues back into the play-offs and into seventh.
Here are our player ratings from the game...

5. Lewis Gordon 7
Recalled to the starting line-up and he made his case to keep his place. He played an important in the opener, intercepting a pass before driving forward and feeding Duffy. He was strong in the tackle and made some good decisions. Photo: Brian Eyre

6. Ryan Stirk 7
Broke up play and landed on second balls. Deserves a lot of credit for geting through 90 minutes in a three-game week after injury. Photo: Tina Jenner

7. Tom Naylor 7
Did the ugly and scrappy work in the middle of the park and kept the ball ticking over. Had a big chance to make it 3-1 but he opted to square it to Grigg but his pass was behind the striker. Another one who deserves a big pat on the back for the work he has put in this week. Photo: Brian Eyre

8. Liam Mandeville 8
Knitted the play together intelligently, kept hold of the ball and was always on the move. He ran, tackled, passed and pressed. And he slammed home the third goal with his left foot from the edge of the box to cap off a top performance. Photo: Brian Eyre

