Marc Richards missed a penalty but the Cobblers still secured a fifth straight win to edge closer to the Sky Bet League Two play-offs.
Richards and Joel Byrom were on target in the 2-1 win at Sixfields, the first time the side has won five on the spin since nap hand of victories under Ian Sampson in February/March 2010.
They clinched all three points despite Richards’ penalty miss and move to 11th in the table, where they are five points off the top seven.
At a damp and chilly Sixfields, Chris Wilder named a side with just one change in it - the expected replacement of the suspended Ryan Cresswell with Zander Diamond in the centre of defence.
As with their previous victories, Northampton made a brisk start to the game and had the lead after only 28 seconds.
Brendan Moloney made an untracked run behind the defence and thrashed a cross-shot towards goal which Andreas Arestidou parried but only into the path of Byrom, who made no mistake from close range.
Richards was hunting a goal to add to his impressive tally right from the start and only an excellent recovery tackle by Andy Parrish denied him after a clipped pass over the top.
On several occasions after that, Town failed to add to their score when in good positions either through underhit passes or wasteful shooting and they paid a price when Morecambe scored with their first meaningful attack.
Jack Redshaw profited from a rebound in midfield to dribble around Lee Collins and strike a shot which Duke blocked with his right foot, up and into the path of Devitt, whose header was not clean but trickled over the line after hitting the left-hand post.
Ricky Holmes almost immediately restored the Cobblers’ advantage but saw his initial shot palmed away and the follow-up effort cleared off the line by Mark Hughes.
Both sides showed their attacking intentions early in the second half but it was the Cobblers who retook the lead, Richards converting at the back post after a scruffy shot from the unlikely source of Evan Horwood had trickled all the way across goal.
The hosts pressed for a game-sealing third and almost got it when John-Joe O’Toole rose to meet a corner, Arestidou tipping the effort over his bar.
Duke had to be on his toes to keep out a copybook Kevin Ellison volley and reacted well to block the follow-up headed effort from Jack Redshaw.
Holmes set up the perfect scoring opportunity for the Cobblers when he burst into the box and was body-checked by Hughes, giving Richards the chance to score from the spot.
The striker went for the opposite corner to the penalty he scored at Accrington in the previous game and although his effort beat Arestidou, it struck the post and bounced away to safety.
Alan Goodall then repeated the trick at the other end, unleashing a fierce shot which beat Duke but rattled the woodwork.
Morecambe poured players forward in the final stages of the game but were unable to create any chances of note and a fifth successive win was secured.
Cobblers: Duke, Moloney, Diamond, Collins, Horwood; Taylor, Byrom; D’Ath, O’Toole, Holmes; Richards
Subs: Tozer (for Diamond 45), Hackett (for O’Toole 80), Newey (for Holmes 89)
Not used: Carter, Bodin, Snedker, Toney
Morecambe: Arestidou; Parrish, Hughes, Edwards; Beeley, Goodall, Fleming, Wilson; Redshaw, Devitt, Amond
Subs: Ellison (for Parrish 46), Mullin (for Amond 66), Sampson (for Fleming 88)
Not used: Kenyon, Williams, McGowan, Jones
Away fans: 128