Chesterfield looked set for the three points after a dream start with two goals from Eoin Doyle in the fourth and 22nd minutes and one from Gary McSheffrey in the 10th had given the dominant Spireites the advantage.
Morecambe were given a brief glimmer of hope when Kevin Ellison pulled one back 40 seconds into the second half.
When home skipper Mark Hughes scored a second on the hour-mark with a shot on the turn from close range the game became even more interesting.
Morecambe found new belief and Jack Sampson poked home Ryan Williams's far post free-kick to bring the sides level and the comeback was complete when with six minutes to go when Padraig Amond headed Sampson's left-wing cross past visiting keeper Tommy Lee to seal a remarkable second-half showing from Jim Bentley's side.
Chesterfield had chances of their own to score a fourth goal with Jay O'Shea firing wide from a good opening and Barry Roche saving well to deny Doyle his hat-trick as Paul Cook's side slipped to a second successive defeat.