A 35th minute penalty by Paddy Madden proved to be the only goal of the match and with closest challengers Wrexham dropping points, a victory by the Hatters against the second-place Dragons on Saturday seals Stockport's return to the EFL after 11 years away.
Story of the match
Madden was off and running three minutes in when a slip by Jamie Grimes saw the Stockport skipper play a chip that was caught with relative ease by Chesterfield goalkeeper Scott Loach.
Just after the quarter hour mark, Antoni Sarcevic crossed from the right and it came to Ash Palmer, but his header was wide of the post.
The Hatters were awarded a penalty when Calvin Miller was adjudged to have handled inside the area from an Elliot Newby cross. Madden stepped up and sent Loach the wrong way to fire the visitors in front.
Tom Denton was dragged down inside the box, but appeals for a penalty were waved away.
Courtney Duffus was unlucky not to have doubled Stockport's advantage when Newby played him through on goal, but his effort over Loach grazed the underside of the crossbar.
Denton tried to set up the passage of play that would pull the Spierites level, heading the ball down for Grimes in the six-yard box, but he could only fire over from close range.
Substitutes then combined for Chesterfield as Saidou Khan dispossessed Ryan Johnson and he fed Akwasi Asante, who drilled one past the right post.
Ben Hinchcliffe would come to the visitors' rescue twice late on. He smothered a header by Grimes that was set up by Jeff King and he tipped King's shot around the right post.
Man of the match: Paddy Madden
He's been at the heart of Stockport's revival, scoring some big goals amongst the 21 tallied this year, but none may be bigger then his penalty today should the Hatters go on to secure a place in League Two.