David McGoldrick struck late as relegation-threatened Ipswich won only their third game of 2013 at the expense of play-off hopefuls Leicester.
McGoldrick, on loan from Nottingham Forest, punished defender Wes Morgan's lapse in concentration to score from 12 yards five minutes from time.
Leicester striker Harry Kane had earlier fired wide from Luke Chambers's poor backpass.
Town turn the tables
Nigel Pearson celebrated the first anniversary of his return as Leicester boss with a 6-0 thrashing of Ipswich in the reverse fixture in November
The Foxes also went close when full-back Paul Konchesky fired just over.
Ipswich are now six points clear of the relegation zone while Leicester remain in the play-off places in fifth, although seventh-placed Middlesbrough's win over leaders Cardiff means the Teessiders are now only three points behind the Foxes.
Kane had the first chance of any note midway through the first half, but his effort did not threaten the Town goal and when the forward tried his luck again just before the half-hour mark he could only fire wide from 10 yards.
Konchesky them struck an effort over the bar, before Kasper Schmeichel made good saves to deny Chambers and McGoldrick at the other end.
Leicester's Danish keeper was called into action again straight after the break, again saving from McGoldrick.
But it was the Foxes who should have opened the scoring when Chambers's mistake put Kane clean through, only for the loan signing from Spurs to send his effort wide.
Leicester were punished for their wastefulness with a few minutes remaining, when McGoldrick finally beat the defence with a well-taken winner.
Ipswich Town boss Mick McCarthy:
"I'm delighted, relieved and glad it's over. It was a well-organised, gutsy performance.
"We weren't the best team by any stretch of the imagination but when it was required we had that little bit of brilliance of composure from David McGoldrick.
"It was a good, aggressive game. You'd expect that from Mick McCarthy and Nigel Pearson teams."
Leicester boss Nigel Pearson:
"We weren't at our best but still had enough chances to get something out of the game, although other off-the-ball incidents contributed to the result.
"All you have to do is take a look at them. I'm not a sour grapes person. He [Wes Morgan] got booked for complaining about somebody elbowing him in the face. Everyone could see that. [Michael] Chopra kicked him off the ball just prior to that.
"All in all it was a bit of a scrappy game but we had chances and didn't take then. We didn't deserve to lose but credit to Ipswich."
Inswinging corner taken by Paul Gallagher, Tommy Smith makes a clearance.
Substitution Andy Drury joins the action as a substitute, replacing David McGoldrick.
Paul Gallagher takes a inswinging corner from the left by-line to the near post, David McGoldrick manages to make a clearance.
Andy King takes a shot. Tommy Smith gets a block in.
Assist on the goal came from Daryl Murphy.
84:24 Goal scored
Goal! - David McGoldrick - Ipswich 1 - 0 Leicester Goal scored by David McGoldrick from deep inside the penalty box to the bottom right corner of the goal. Ipswich 1-0 Leicester.
Paul Konchesky crosses the ball, Header from deep inside the area by Harry Kane goes harmlessly over the crossbar.
Booking The referee cautions Wes Morgan for unsporting behaviour.
Aaron Cresswell restarts play with the free kick. David McGoldrick gives away a free kick for an unfair challenge on Wes Morgan. Wes Morgan restarts play with the free kick.
Substitution Daryl Murphy comes on in place of Michael Chopra.
Substitution Jay Emmanuel-Thomas is brought on as a substitute for Lee Martin.
Free kick awarded for an unfair challenge on Tommy Smith by Harry Kane.
The assistant referee flags for offside against Michael Chopra. Kasper Schmeichel restarts play with the free kick.
Danny Drinkwater has an effort at goal from outside the penalty box missing to the wide right of the target.
Paul Gallagher takes the direct free kick.
Booking Luke Hyam receives a yellow card.
Foul by Luke Hyam on Harry Kane, free kick awarded.
Carlos Edwards sends in a cross, Michael Keane makes a clearance.
Guirane N'Daw challenges Harry Kane unfairly and gives away a free kick. Paul Gallagher delivers the ball from the free kick right-footed from right channel.
Aaron Cresswell has shot on goal from just outside the penalty box which goes wide of the right-hand upright.
Inswinging corner taken from the right by-line by Aaron Cresswell, Andy King makes a clearance.
A cross is delivered by Richard Stearman, Andy King gets a block in.
Substitution Paul Gallagher is brought on as a substitute for Ben Marshall.
Corner taken left-footed by Aaron Cresswell from the right by-line, Andy King makes a clearance.
The ball is delivered by Carlos Edwards, blocked by Paul Konchesky.
Substitution Lloyd Dyer replaces Anthony Knockaert.
Guirane N'Daw concedes a free kick for a foul on Ben Marshall. Free kick crossed right-footed by Ben Marshall from right channel. Harry Kane is flagged offside by the assistant referee. Stephen Henderson takes the indirect free kick.
David McGoldrick produces a right-footed shot from just outside the box that misses to the right of the target.
Unfair challenge on Michael Chopra by Danny Drinkwater results in a free kick. Richard Stearman takes the free kick.
Luke Chambers fouled by Chris Wood, the ref awards a free kick. Free kick taken by Stephen Henderson.
Corner taken by Anthony Knockaert from the right by-line played to the near post, clearance by David McGoldrick.
The referee blows for offside against Michael Chopra. Kasper Schmeichel restarts play with the free kick.
Danny Drinkwater gives away a free kick for an unfair challenge on Tommy Smith. Stephen Henderson takes the direct free kick.
Shot by Harry Kane from deep inside the penalty area misses wide to the left of the target.
Foul by Andy King on Michael Chopra, free kick awarded. Strike on goal comes in from Lee Martin from the free kick, blocked by Ben Marshall.
Guirane N'Daw gives away a free kick for an unfair challenge on Ben Marshall. The free kick is swung in right-footed by Ben Marshall, David McGoldrick makes a clearance.
Chris Wood produces a right-footed shot from outside the penalty box and misses right.
David McGoldrick takes a shot. Kasper Schmeichel makes a save.
Lee Martin takes a shot.
Booking Booking for Anthony Knockaert.
The referee gets the second half underway.
45:00 +1:09 Half time
Half Time The ref blows to end the first period.
Shot by Harry Kane from just outside the area goes over the net.
Centre by Paul Konchesky. Harry Kane is caught offside. Direct free kick taken by Stephen Henderson.
Chris Wood challenges Richard Stearman unfairly and gives away a free kick. Luke Chambers takes the free kick.
Free kick awarded for an unfair challenge on Guirane N'Daw by Chris Wood. Stephen Henderson takes the free kick.
Inswinging corner taken right-footed by Ben Marshall from the left by-line, save by Stephen Henderson.
Ben Marshall takes a shot. Richard Stearman gets a block in.
David McGoldrick delivers the ball, Michael Chopra takes a shot. Save by Kasper Schmeichel.
Inswinging corner taken by Aaron Cresswell, Headed effort from deep inside the penalty area by David McGoldrick goes harmlessly over the crossbar.
Inswinging corner taken by Aaron Cresswell from the right by-line, Luke Chambers takes a shot. Save by Kasper Schmeichel.
Free kick awarded for a foul by Danny Drinkwater on Guirane N'Daw. Free kick taken by Aaron Cresswell.
The ball is delivered by Carlos Edwards, save by Kasper Schmeichel.
Paul Konchesky takes a shot from just outside the penalty area clears the crossbar.
Free kick awarded for an unfair challenge on Carlos Edwards by Paul Konchesky. Richard Stearman restarts play with the free kick.
Effort from the edge of the area by Harry Kane goes wide of the right-hand post.
Lee Martin takes a shot. Blocked by Ritchie De Laet. Corner taken left-footed by Aaron Cresswell, Ritchie De Laet makes a clearance.
Inswinging corner taken right-footed by Ben Marshall from the left by-line to the near post, save made by Stephen Henderson.
Guirane N'Daw gives away a free kick for an unfair challenge on Danny Drinkwater. Michael Keane takes the free kick.
Corner from the left by-line taken by Lee Martin, save by Kasper Schmeichel.
Free kick awarded for a foul by Wes Morgan on Guirane N'Daw. Aaron Cresswell restarts play with the free kick.
The referee blows for offside. Stephen Henderson takes the indirect free kick.
Unfair challenge on Michael Chopra by Danny Drinkwater results in a free kick. Stephen Henderson takes the free kick.
Michael Chopra is flagged offside by the assistant referee. Kasper Schmeichel restarts play with the free kick.
Ben Marshall takes a shot. Save made by Stephen Henderson.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.