The visitors were always in control after Kieran Agard gave them a first-half lead and a header from Aden Flint early in the second period wrapped up the points.
City took the field through a guard of honour from the Spireites players and management but the hosts had the first chance when Jay O’Shea put Jimmy Ryan in on the right and Frank Fielding saved with his legs.
The visitors responded by taking the lead in the 31st minute as Agard went past Sam Hird and placed a low shot from 10 yards past Tommy Lee, who then denied the striker a second just before half-time.
Sam Clucas had a chance after Gary Roberts put him in on the left but Fielding turned his shot behind and City increased their lead in the 55th minute when Flint climbed to head in a corner.
Roberts hit the bar with a dipping shot from 25 yards in the 76th minute but City were deserved winners, while Chesterfield secured a play-off place courtesy of Rochdale’s defeat to MK Dons.