Darren Ferguson's men were 3-0 down and it looked like there was no way back, but goals from Michael Bostwick and Marcus Maddison did set up a tense finale, particularly with five minutes of injury time.
After forcing the first corner kick of the afternoon, it was Posh who registered the opening effort on goal, but the deflected shot from Harry Beautyman was comfortably claimed by Chesterfield goalkeeper Tommy Lee.
Ben Alnwick made a smart stop with his legs to deny the lively Roberts at the back post on six minutes. On 10 minutes, the Spireites opened the scoring as a low cross from Darikwa was turned home from close-range by the leading goalscorer in League One, Eoin DOYLE, who only needed to get a touch.
Alnwick made a routine stop down to his left to deny Gnanduillet on 14 minutes as the hosts continued to threaten.
Posh were forced into a change on 28 minutes as Jack Payne limped out of the action - Marcus Maddison was his replacement.
Oztumer sent a dipping shot from 25-yards over the bar after a patient Posh build-up as the game reached the half hour mark.
Mclean saw a shot cleared away from danger from around six-yards after Maddison's speculative effort fell kindly for the on-loan Bradford City man.
On 34 minutes, the hosts made it 2-0 and they can certainly claim they had the luck with them as the ball ricocheted across the six-yard box and into the path of Armand GNANDUILLET who had a simple tap in.
James was denied by Lee on 43 minutes after racing onto a Beautyman flick. Roberts screwed a shot inches past the post after trickery from Gnanduillet on the right hand side.
Chesterfield made it 3-0 on 53 minutes as DOYLE advanced and fired a superb right-footed shot past Alnwick from 25-yards into the bottom corner of the net.
Posh pulled a goal back on 63 minutes as a Maddison free-kick was guided home by BOSTWICK with a glancing header from close range.
Roberts blazed over from close-range on his left-foot after Doyle danced through the Posh defence moments later. On 70 minutes, Posh grabbed another goal back as a cross from MADDISON was missed by Lee under pressure from James.
Alnwick made a smart save down to his right to deny a fierce O'Shea free-kick as the game entered the final stages.
Chesterfield: Lee, Darikwa, Hird, Gnanduillet (sub Jones 59min), Roberts (sub Banks 70min), Clucas, Humphreys, Raglan, Doyle, Boco (sub O'Shea 70min), Evatt. Subs: Wright, Gardner, Jones, Ariyibi, Beresford.
Posh: Alnwick, Smith, Bostwick, Burgess, Zakuani, Payne (sub Maddison 27min), Oztumer, Beautyman, Newell, James, Mclean (sub Washington 60min). Unused subs: Day, Santos, Mendez-Laing, Vassell, Anderson.
Attendance: 8353 (835)
Half-time: Chesterfield 2-0 Peterborough United