The Cobblers came from behind to win for the first time this season to give their new year a cracking start and keep them snapping at the heals of the Coca Cola League Two leaders.
But this match hinged on the controversial dismissal of Derek Asamoah, the former Northampton player who was making his first return to Sixfields since joining the Stags in the summer.
Asamoah was shown the red card by referee Andy Penn in first-half stoppage time for a second booking, both earned for apparently diving in the penalty area.
Within seconds of Asamoah going off, ten-man Mansfield grabbed the lead when Paul Warne, their match-winner at Southend on Tuesday struck a corner to the near post and David Rowson headed past his own keeper.
The home side stepped up the pressure after the break and Trevor Benjamin, who was making his debut after signing from Leicester 24 hours earlier, should have put them level two minutes after the restart but instead he side-footed wide.
Benjamin made amends six minutes later when Mansfield failed to clear his lines from a Martin Smith cross and he smacked the loose ball home.
Fierce wind and rain made conditions even more difficult for the visitors who were unable to escape from their own half, and the Cobblers secured their winner with 13 minutes to go. Rowson fed the ball in low from the right and his cross was headed in by Smith for his fifth goal of the season.
The victory was sweet for Northampton who were beaten by Mansfield in the play-off semi-finals last season and had also taken a 4-1 beating in the league at Field Mill this season.
Their only disappointment in notching a fourth consecutive league win was in not making the victory more emphatic, with top scorer Scott McGleish volleying over the crossbar from 12 yards in stoppage time.