Chesterfield's defence held out against fierce second-half pressure to claim another hard-earned victory thanks to an outstanding goal from Chris Brandon.
The midfielder struck a left-foot shot past Lee Jones in the 44th minute but did not appear for the second half because of a trapped nerve.
Chesterfield certainly missed his invention and Stockport poured forward in waves but created few clear openings.
The former Chesterfield striker Luke Beckett missed badly at the end and Jonathan Daly struck a post in the 89th minute.
All this was in contrast to the first 45 minutes that Chesterfield controlled and they also played some sparkling football.
Brandon forced as full-length save from Jones with a curling left-foot shot in the eighth minute and David Reeves shot straight at the keeper when well placed in the 16th minute.
Stockport had few chances but looked to have kept Chesterfield at arms length until a long throw was touched on and Brandon swivelled to fire a low shot into the bottom left-hand corner of the net.
Stockport came out in a different mood in the second half and Beckett had a half chance in the 46th minute but shot wide.
There were several goalmouth scrambles with Chesterfield defenders throwing themselves in the path of goalbound shots but their inexperienced defence deserved to come away with another clean sheet.
After the game the Spireites assistant manager Lee Richardson said: "They're not the three biggest defenders but they are honest and they were magnificent tonight.
"We've lost matches like that before but with a little bit of luck we managed to keep them out."
Stockport player manager Carlton Palmer felt his team were unlucky and said: "We battered them for the whole of the game."