Two goals in the final 13 minutes ensured that the Cobblers earned themselves valuable breathing space in the fight against relegation.
Bournemouth suffered their second away day defeat inside five days and Kevin Bond's men are still glancing nervously over their shoulders despite a spirited second-half recovery.
Three different strikers hit the target for the home side, with Jordan Robertson, Kenny Deuchar and substitute Andy Kirk getting the goals that mattered to render a second-half equaliser by Marc Wilson a mere statistic.
Robertson's 17th minute opener was a real gem. The teenager, on loan from Sheffield United, showed exquisite skill to turn and fire home from a tight angle after collecting a cross from Sam Aiston.
Northampton should have stretched their lead before the break as the visitors looked a poor outfit and Deuchar was unlucky with a header which looped over the crossbar.
There was a hint of things to come in first-half stoppage-time when Stephen Purches fired into the side-netting, but he was one of two players taken off at the break as the Cherries shook up their formation and threw forwards on to the field.
They were rewarded for their switch by equalising in the 55th minute after forcing three corners in quick succession.
After Mark Bunn had tipped away a header from James Hayter and Warren Cummings had seen a low shot blocked, Bournemouth equalised after Jason Crowe denied a Hayter header on the line only for Wilson to volley in the rebound.
Deuchar had a header saved by Neil Moss before Northampton restored their lead in the 77th minute.
Andy Holt delivered a cross from the left and the on-loan Gretna striker Deuchar was completely unmarked as he directed a header past Moss.
Bournemouth almost responded immediately only for Hayter to fire wide after Josh Gowling had nodded a Wilson free-kick back into the box.
But the visitors hopes were dashed six minutes from time and again the goal came from a corner.
When Bradley Johnson delivered the centre, it was headed on at the near post by Ian Taylor before substitute Kirk applied the finishing touch.