Northampton were gifted the game's only goal in a match they deserved to win.
The visitors were on top, with Junior Mendes and Scott McGleish constantly tormenting Barnet, while Martin Smith went close from midfield.
And it was McGleish who scored from the spot after Ismail Yakubu gave the ball to Mendes who was subsequently brought down in the area by Damien Batt.
McGleish's goal came at the start of a frenzied second half in which Giuliano Grazioli fired wide for Barnet.
Barnet: Flitney, Batt, Yakubu, King, Charles, Strevens (Clist 81), Sinclair, Lee, Bailey, Grazioli, Hatch.
Subs Not Used: Tynan, Vernazza, Norville, Roache.
Booked: Batt, Lee.
Northampton: Harper, Chambers, Dyche, Doig, Low, Rowson, Hunt (Bojic 88), Smith, Crowe, McGleish, Mendes (Gilligan 77).
Subs Not Used: Jess, Cross, Poke.
Goals: McGleish 48 pen.
Att: 2,544
Ref: P Crossley (Kent).