Grant McCann's side had to come from behind but were helped when the hosts had a man sent off in the second half, eventually managing to turn the screw and seal a place in Monday’s draw.
Jordan Gibson fashioned the first chance of the game when he latched onto a brilliant forward ball through the middle by Luke Molyneux. Gibson advanced towards goal but saw a shot smothered by the onrushing Zach Hemming in the home goal.
The hosts had to wait until the half-hour mark for their first proper venture forward when Lee Bonis saw a shot deflected just past the post and out for a corner.
Thimothee Lo-Tutala then made an excellent save to keep out a Liam Mandeville shot but it fell right into the path of Bonis who gleefully tapped in for his second goal against Rovers in as many games.
The visitors weren't behind for long, mind. Skipper Owen Bailey was on hand to plant home a header from a glorious Molyneux cross from the right.
The Spireites started the second half brighter and Mandeville prodded a shot just wide a few yards out before Rovers went forward and saw Molyneux go close after a quick breakaway.
The game's turning point then came on the hour when John Fleck was shown a straight red card for a lunging tackle on Bailey - he'd only been brought on as a sub five minutes earlier.
Rovers then sought to make the man advantage count as Molyneux fired a warning shot that was straight at Hemming before the over-worked stopper tipped a long-range Jamie Sterry striker over the bar.
Sub Billy Sharp thought he'd scored from just a few yards out only for the assistant referee's flag to quickly rule it out for offside. But another sub eventually popped up with the winner when Jack Senior fired home from distance to finally break Chesterfield's stubborn resistance.
Here's how we rated the Rovers players in Derbyshire:

5. James Maxwell 7
Bright display as he linked up well with Gibson and got forward down his left flank at regular junctures. Went down after a heavy knock to the head late on, with Senior replacing him. Photo: Howard Roe/AHPIX LTD

6. Owen Bailey 8
Sets the tone so often, with his pressing and tenacity. Right place at the right time to finish a terrific header and level the game up to move onto a hugely impressive eight goals for the season so far. Took a nasty one in the incident which saw Fleck given his marching orders but thankfully was ok to carry on. Photo: Howard Roe/AHPIX LTD

7. George Broadbent 7
Tidy in possession and didn't generally put a foot wrong. Went off for the last 15. Photo: Howard Roe/AHPIX LTD

8. Harry Clifton 6
Carded early doors for a lunge tackle that caught a Chesterfield player high up. Was involved in some of the build-up play going forward but replaced by Crew at half-time. Photo: Bruce Rollinson/AHPIX LTD

