Bury extended their unbeaten league run to five games with striker Joe O'Neill again their hero.
O'Neill netted a 94th minute winner at Bristol Rovers last weekend and scored the only goal of a scrappy game with 16 minutes left.
The on-loan Preston youngster pounced to convert Lee Connell's corner after earlier narrowly going wide with another header from a Phil Gulliver centre.
His third of the season came with the Shakers on top but Northampton, despite being below par, battled for an equaliser in the closing stages.
They might have got it as well. Terry Dunfield was booked for protesting the award of a free kick and the ball was brought forward ten metres by referee Mark Clattenburg.
Greg Lincoln floated in the ball but Richard Walker badly miscued his header back across goal instead of on target.
Delighted Bury boss Andy Preece said: "It always looked likely to end 1-0 and fortunately we were on the right end of it. We kept them away from our goal and defended really well apart from that one chance towards the end of the game.
"Joe is getting there and he is able to get in a position to get you goals.
"He came here to learn the game and he is learning fast." Former Manchester City youngster Dunfield was Bury's other star. Just back from international duty with Canada's Under-23's, Dunfield ran the midfield and deservedly picked up the Man of the Match award.
Northampton manager Colin Calderwood hopes this defeat is only a blip rather than something more serious. "We are slightly disappointed because we fell below the level we have set ourselves," he said.
"And if we want to call ourselves a good team, we need to bounce back straight away. I'll be looking for the reaction of the players but hopefully this is only a temporary setback."