A moment of quality settled an otherwise scrappy and nerve-ridden match when Shane Tudor took Leyton Orient closer to League One safety.
His second goal of the season in the 53rd minute was enough to condemn Chesterfield to a fourth successive defeat, but it also needed a stunning late save from Glyn Garner to keep the Londoners in front.
Chesterfield could not have done much more in terms of effort and work rate but their finishing let them down and, although Orient did not create as many chances, they took one of the few openings that came their way.
This victory was a massive one and the defeat was also a serious blow to Chesterfield's hopes of staying in the division.
Manager Roy McFarland stuck with the 3-5-2 formation that he used in the second half against Bristol City on Wednesday night and for the opening 20 minutes it looked as if it would pay dividends.
Orient were struggling to cope with the Chesterfield formation, but young striker Jamie Jackson could not mark his first start with a telling finish when he was put through by Alex Bailey in the fourth minute.
Garner blocked his low shot and Orient scrambled the ball to safety and that frustrating moment was to set the tone for the home side.
The visitors gradually settled down but it was Chesterfield who had the majority of possession.
However, the Orient defence soaked up everything that was thrown at them before half-time.
They had found the net only for an offside flag to deny Gary Alexander in the 25th minute, but they made no mistake in the 53rd minute when Tudor tucked away only his second goal of the season.
Minutes earlier Jackson had wasted another good opening and Chesterfield were made to pay when Ryan Jarvis chested a pass from Wayne Corden into the path of Tudor who chipped over the advancing Barry Roche from ten yards.
It was an excellent finish and, although Orient had few chances to increase their lead, they looked relatively comfortable as the home side became increasingly desperate.
Chesterfield's final ball was generally poor but in the final ten minutes they at last started to create.
Jackson lifted the ball over Garner only for John Mackie to sweep up behind his keeper, but a goal looked inevitable when Paul Shaw connected powerfully with a close-range header only for Garner to somehow push the ball over the bar.
It was a superb save and he made another crucial stop from the resulting corner when he kept out a deflected shot with his left foot.
Chesterfield could not believe their luck but Orient celebrated at the end with their fans and now look to be heading away from the relegation scrap.