A second-half double strike by Cambridge striker Daniel Chillingworth almost earned his side their first away win of the campaign.
He cancelled out David Rowson's early goal for the Cobblers and again capitalised on schoolboy defending by the home side to make it 2-1 in the 59th minute.
But United's hopes of securing that elusive first win on the road were dashed when Scott McGleish notched his 15th goal of the season with nine minutes left.
Cambridge had won five and drawn one of their last six visits to Northampton but that record looked fragile when Rowson scored with a looping shot from the edge of the box which caught John Ruddy off his line and went in off the far post.
Northampton should have been home and dry by the break as they missed a host of excellent chances.
Rowson teed up Eric Sabin in the 17th minute but with the goal at his mercy he somehow fired wide while Lee Williamson went close twice inside two minutes, seeing Ruddy tip over a fierce drive before blazing another just over the crossbar.
In the 29th minute Pedj Bojic saw his angled drive crash down from the underside of the crossbar while Cambridge's few first-half chances were long-range efforts.
But the complexion of the game changed two minutes after the restart when Christopher Willmott lost the ball near the byline and Chillingworth scored, beating Lee Harper at his near post.
A Chillingworth shot then almost fooled Harper who recovered to block the rebound from Shane Tudor but the U's went ahead in the 59th minute when Tom Newey's corner was met by Adam Tann's powerful header and Chillingworth glanced the ball past the Cobblers keeper.
McGleish's late face-saver arrived at the end of a sweet move involving subs Stuart Noble and David Galbraith. When Galbraith crossed to the back post, Bojic headed into the danger zone and McGleish slotted home from a matter of yards.