But late goals by Thomas Gaardsoe and Darren Ambrose helped to secure a shock victory for Joe Royle’s side.
Leicester had taken the lead in the 55th minute with a controversial penalty.
Fabian Wilnis appeared to handle the ball and Paul Dickov just managed to beat Andy Marshall from the spot.
However, the goal was fully deserved as Micky Adams’ side dominated the opening half.
Marshall had to be alert to deny Jamie Scowcroft in the 40th minute when he tipped a powerful header on to the crossbar before getting up to punch the ball to safety in volleyball fashion.
The game looked to be coming to a predictable conclusion whenGaardsoe managed to loop a header over Ian Walker with just six minutes left – the Danish player’s second goal in two games.
Then with just two minutes remaining Darren Ambrose grabbed the winner after a goalmouth scramble.
The win lifts Ipswich up to 16th in the table while Leicester remain second, six points clear of third-placed Sheffield United.