With the game drifting towards a 1-1 draw, a cross from the left deflected off the unfortunate Republic of Ireland international, wrong-footing Conrad Logan and trickling into the net to hand victory to the home side.
New Zealand international Chris Wood had earlier rifled in a powerful volley from 20 yards after a sublime lay-off from Martyn Waghorn in the 20th minute to cancel out Ian Collins’ opening strike for Northampton.
Nigel Pearson’s men certainly looked the part in spells against the Cobblers, and could have easily have secured victory themselves, but Ritchie De Laet, Lloyd Dyer and Jamie Vardy were all denied during the second half.
Youngster Tom Hopper again featured in defence for The Foxes, who adopted the 3-5-2 formation that has become a familiar feature of their pre-season schedule.
Lloyd Dyer and Liam Moore started in the wing back positions while Wood and Waghorn struck up a partnership in attack. Neil Danns, Paul Gallagher and Ben Marshall formed the midfield three.
City raced out of the blocks in that formation and should have been ahead as early as the second minute when Wood rounded Cobblers ‘keeper Matt Duke, only to see his resulting effort blocked.
A flurry of corners followed for Leicester, but ironically it was the home side who were to open the scoring on 13 minutes – from a set piece.
A corner came in from the right that was met with a looping header which Kasper Schmeichel did brilliantly to tip away, only for Gary Deegan to recover the ball and set up Collins for a shot the flew through a crowd of players into the net.
City were level seven minutes later though through a simply stunning volley from Wood.
Schmeichel had fired a goal kick up to Waghorn, the forward doing brilliantly to flick the ball up into the path of his strike partner, who accepted the invitation to pull the trigger from 20 yards, giving Duke no chance as the ball flew into the top corner.
The Foxes defence was coping well with a very direct Northampton side, who were this season without the services of man-mountain Adebayo Akinfenwa, and still caused their hosts problems at the same time – Liam Moore firing over after some great play from Danns.
Despite this, a final flurry of chances then fell the way of the Cobblers after a brief spell of pressure.
First Michael Spillane headed against the crossbar, then Schmeichel sensationally saved the follow up as well as another from Deegan before Ian Morris finally put the ball wide at the far post.
City made four changes after the break – Schmeichel, Zak Whitbread, Waghorn and Danns making way for Logan, Anthony Knockaert, De Laet and Jeff Schlupp.
And it wasn’t long before substitute ‘keeper Logan was called into action – expertly turning away Ben Tozer’s shot while at the other end Dyer had a great low effort saved.
Four more changes followed for City, who looked buoyed by an injection of energy from Jamie Vardy, who won the ball brilliantly from Samir Bihmoutine to release De Laet on the right, however the wing back’s cross was just behind an advancing Schlupp.
The expansive football continued in spells from City, but unfortunately De Laet couldn’t keep his header down after Danny Drinkwater fired in a venomous cross from the right with 20 left on the clock.
De Laet’s pace on the right was becoming City’s main outlet and he almost turned provider for Vardy on 75 minutes, but the striker header the Belgian’s cross into the ‘keeper’s arms.
However with the game seemingly set for a draw, Northampton were handed a slice of luck with just seconds to go when a teasing cross deflected of St. Ledger and into the net for 2-1, as City now focus their attentions on Saturday's league opener.
Northampton: Duke, Amankwaah, Widdowson, Carter, Cillins, Morris, O’Donovan, Tozer, Deegan Emerton, Spillane
Subs: Reeve, Demontagnac, Whitaker, Snedker, Hooper, Artell, Moyo, Dias, Roberts
Goal: Collins 13, St. Ledger og 90
City: Schmeichel (Logan 46), Whitbread (De Laet 46), Marshall (Drinkwater 61), Dyer (James 61), St. Ledger, Waghorn (Knockaert 46), Danns (Schlupp 46), Gallagher (Bakayogo 61), Moore, Hopper, Wood (Vardy 61)
Goal: Wood 20
Referee: Mr. D Whitestone
Attendance: 1,812 (751 away)