Town bossed the opening exchanges but struggled to create chances, Paul Cook's men gradually growing in confidence and causing all sorts of bother for their hosts.
The home side thought they were ahead just before the break when Nathan Pond tapped in at the back post but the assistant's flag was raised.
After the break Chesterfield asserted themselves and took the lead from a set piece, Ritchie Humpreys' corner flicked on at the near post for Liam Cooper to apply the final touch.
A late rally saw Town haul themselves back into it and, with one minute left, Parkin popped up at the back post to hammer home after Hughes had flicked on Junior Brown's cross.
- Ryan Cresswell
- Tendayi Darikwa