Substitutes Jamie Winter and Martin Gritton were the matchwinners for Chesterfield.
With the game well poised at 1-1 midway through the second half, Spireites boss Lee Richardson made the all-important changes, which didn't go down well with the away fans.
However, the boss was proved right as the duo chipped in with a goal each to settle the game for the visitors.
With the strong wind at their backs in the first half Chesterfield had much the better of the opening exchanges, but it was Chester who came closest to opening the scoring early on when James Vaughan's deflected shot struck the outside of the post.
Chester's Kevin Ellison should have done better when presented with a clear chance in the 17th minute but he couldn't keep his diving header down.
On 26 minutes a mix-up between John Danby and Vaughan presented Jamie Ward with an open goal, but his shot from a tight angle went right across the face of goal.
The visitors took the lead on the half-hour mark with an own goal from defender Laurence Wilson, who got his head to Gregor Robertson's fierce inswinging corner, but only succeeded in flicking it over Danby and into his own net.
Danby did well to block an effort from Robertson early in the second half and from the ensuing corner Jack Lester missed with a free header from less than six yards out with the goal at his mercy.
It was a costly miss because Chester were back on level terms on 53 minutes through French midfielder Damien Mozika, who rose superbly to head Mark Hughes' cross into the far corner of the net.
Ryan Lowe should have done much better when put through on the hour mark but sliced his effort wide under pressure from Dan Gray.
With 20 minutes remaining Chesterfield boss Richardson then made the move which decided the outcome, bringing on Winter and Gritton for Gray and Peter Till.
On 77 minutes Winter blasted in a shot from 25 yards into the bottom corner of the net to put the visitors 2-1 ahead.
Then Gritton made the game safe in the 82nd minute, bundling the ball over the line after Lloyd Kerry's shot looped over Danby and looked to be heading into the net before the striker made sure.