Gillingham’s six-game unbeaten run came to an end at Priestfield on Saturday.
The Gills battled back from two goals down to level but still lost the match.
Sam Clucas put Chesterfield ahead midway through the first half and an own goal from Leon Legge doubled their advantage shortly after the restart.
Substitute Cody McDonald halved the deficit and John Egan equalised for the Gills but Jimmy Ryan fired home Chesterfield’s winner.
Gills manger Peter Taylor named an unchanged team for the visit of Chesterfield.
Just four subs from a possible seven were named by the visitors as injuries, suspensions and illness contributed to leave Paul Cook’s squad threadbare.
League 1’s leading scorer Eoin Doyle – with 19 goals to his name – was one of those named on the bench.
For Gills, there was a change among their substitutes, with Danny Kedwell returning at the expense of Danny Galbraith. Amine Linganzi was also included.
Taylor set his side up in a similar formation to the one which had success in the second half at Doncaster. Striker Luke Norris led from the front with Bradley Dack playing just behind in a 4-4-1-1 formation.
Armand Gnanduillet came close to giving Chesterfield an early lead but Gills had Brennan Dickenson to thank for clearing the ball off the line.
Taylor’s men always looked a threat in the opening half but Chesterfield went into the break ahead. Clucas tried his luck from an angle and a deflection off John Egan took it past Stuart Nelson.
The hosts had a number of good chances to level in the first half.
Skipper Doug Loft missed connecting onto a great cross from Dickenson while Leon Legge headed a corner over and Dack’s long-range shot was saved.
The Gills had an early let-off in the second half. Gary Roberts was unmarked and ready to fire home but the pass from Armand Gnanduillet was poor.
Chesterfield did make it 2-0 with 55 minutes gone when Tendayi Darikwa’s low cross was turned into his own net from Leon Legge, with striker Gnanduillet lurking.
Four minutes later the Gills pulled a goal back. Loft’s cross from the left was met by McDonald, heading in from just a few yards out.
Egan then pounced to level the scores on 62 minutes, with another header, as he diverted another Loft cross past keeper Tommy Lee. It was Egan’s fourth goal of the season.
Gillingham were level for just eight minutes when Ryan tried his luck from the edge of the box and fired past Nelson. The goal was sucker-punch for the Gills and they were flat for the last 20 minutes.
Despite that McDonald could have still levelled with the last kick. He found himself one on one with the keeper but the Chesterfield no.1 got a faint touch as the ball went wide.
Gillingham: Nelson, Hessenthaler, Martin, Egan, Ehmer, Legge, Loft, Doughty, Dack (McGlashan 54mins), Norris (Kedwell 72mins), Dickenson (McDonald 54mins). Subs not used: Linganzi, Lennon, Hoyte, Bywater.
Chesterfield: Lee, Darikwa, Hird, Ryan, Gnanduillet, Roberts, Clucas, Humphreys, Raglan, Boco, Evatt. Subs not used: Wright, O’Shea, Doyle, Ariyibi.
Attendance: 6,841 (249 away)