Captain Steve Fletcher's injury-time winner lifted Bournemouth back into the play-off places.
Wayne Allison's header gave the hosts an early lead but Fletcher equalised just after half-time by lashing home the rebound after his header was saved.
Brian Stock fired the Cherries ahead with a superb 25-yard free-kick before Chesterfield drew level through Steve Blatherwick's header from a corner.
But Fletcher had the final word when he powered home an unstoppable header.