Morecambe have never beaten Accrington Stanley away from home and that run continued after a second successive League Two defeat.
The Shrimps, who were beaten 2-1 by Bury on Saturday, started well enough and took a 14th minute lead through Matthew Blinkhorn.
But former Morecambe defender Darran Kempson netted an equaliser just before the break to pull the hosts back into the contest.
Michael Twiss put the visitors ahead for a second time five minutes after the restart, but two goals in the space of two minutes saw Stanley give their manager John Coleman plenty to smile about.
Andy Mangan bagged the home team's second goal of the game, before Paul Mullin proved the match winner with a sweet strike in the 73rd minute.
Accrington were the better side in this eagerly awaited Lancashire derby, but the home team were indebted to a superb save by their keeper Kenny Arthur in only the first minute.
The shot-stopper denied Twiss from close range, before Stanley rallied an Ian Craney shot wide and Mullin fired over the bar.
Against the run of play, Blinkhorn headed Morecambe into a surprise lead and then, eight minutes later, nearly scored a second with a fierce shot which flew over the Accrington crossbar.
Five minutes before the break, Kempson shot wide and Crainey had an effort charged down, before Kempson levelled matters with a clinical finish.
Twiss restored Morecambe's advantage, before Leam Richardson fired over and David Mannix forced a smart stop from Morecambe keeper Shwan Jalal.
But an equaliser was not long in coming and it was substitute Mangan who got it.
The former Blackpool hitman kept his composure for his first goal since November of last year.
And victory was secured a minute later when Mullin bagged his 13th goal of the season.