Sean St Ledger scored in the sixth minute of stoppage time to send Leicester into the Capital One Cup second round at the expense of Wycombe.
David Nugent gave the Foxes the lead from the spot in the first half after Wycombe captain Stuart Lewis had brought down Andy King in the box.
Jo Kuffour then smashed home a superb equaliser from the edge of the area.
With seconds left, St Ledger scored the winner after Matt Ingram parried Ritchie De Laet's effort.
"It was a cruel blow but I feel like a winner tonight," said Wycombe boss Gareth Ainsworth.
"The way we performed, approached the game and stood up to a Premiership-contending team was outstanding."
League Two Wycombe, who beat Leicester in the 2001 FA Cup quarter-finals, came close to levelling when they were trailing 1-0 but Dean Morgan's left-footed drive just failed to find the target.
Kuffour finally levelled matters but the visitors went back on the attack, forcing Wycombe keeper Ingram to make brilliant saves to deny Neil Danns and Lloyd Dyer.
Chris Wood then narrowly fired wide for Leicester before St Ledger scored from close range deep into stoppage time to send the Championship side through.
The Foxes have won six and lost none of their last seven away games in the League Cup (excluding penalties).
"Competitions are always going to throw up difficult games and we were expected to win this, they had nothing to lose and I thought it was a good game of football," Leicester manager Nigel Pearson said.
VIEW FROM THE DRESSING ROOM
Wycombe manager Gareth Ainsworth told BBC Three Counties Radio:
"I feel like a winner. Every Wycombe fan who turned up and sang their hearts out should go home feeling like a winner too because they should be proud of their club. I'm so proud of those boys. We were in it right until the last minute, deservedly so too.
"On the whole, I'm really pleased. My staff, my players approached this game superbly and I want everyone to stay positive because I'm trying to bring the good times back to Wycombe Wanderers.
"We went with a different formation, we thought we'd try to catch Leicester's midfield on the hop and I thought we did it, it worked really well.
"(Jo Kuffour) has had a really good pre-season - he's come back fit strong, he's looking good."
Live Text Commentary
Full Time The final whistle goes and the game is over.90:00 +5:01 Goal scored
Goal! - Sean St. Ledger - Wycombe 1 - 2 Leicester Sean St. Ledger grabs a goal with a left foot finish. Wycombe 1-2 Leicester.90:00 +4:40
Corner taken by Neil Danns.90:00 +4:27
Matt Ingram manages to make a clearance.90:00 +4:24
Corner from the left by-line taken by Neil Danns.90:00 +4:08
Chris Wood takes a shot.90:00 +3:46
Corner taken by Neil Danns.90:00 +1:20
Header by Wes Morgan goes over the bar.90:00 +1:06
Corner from the right by-line taken by Anthony Knockaert.90:00 +0:49 Substitution
Substitution Paris Cowan-Hall on for Jo Kuffour.89:59
Header at goal by Kortney Hause misses left of the target.89:45
Corner from the right by-line taken by Josh Scowen.88:16 Substitution
Substitution Dean Morgan goes off and Max Kretzschmar comes on.85:19
Shot comes in from Chris Wood from the free kick that goes wide of the right-hand upright.84:41
Free kick awarded for a foul by Dean Morgan on Anthony Knockaert.84:21
Kortney Hause makes a clearance.82:45
Free kick taken by Lloyd Dyer.82:36 Booking
Stuart Lewis receives a yellow card.82:27
Stuart Lewis gives away a free kick for an unfair challenge on Jeff Schlupp.
Free kick awarded for a foul by Andy King on Matt Spring.76:41
Corner from the left by-line taken by Anthony Knockaert.76:08
Kasper Schmeichel takes the free kick.75:57
Free kick awarded for a foul by Charles Dunne on Jeff Schlupp.75:19
Sean St. Ledger restarts play with the free kick.75:10
Dean Morgan gives away a free kick for an unfair challenge on Neil Danns.74:33 Substitution
Substitution Jon-Paul Pittman comes on in place of Steven Craig.73:39
Lloyd Dyer takes a shot and went wide left of the net.72:30
Shot by Stuart Lewis cleared the target.71:32
Free kick taken by Matt Ingram.71:16
Unfair challenge on Marvin McCoy by Anthony Knockaert results in a free kick.67:30
Chris Wood takes a shot and went wide right of the target.66:24
Clearance by Wes Morgan.65:57
The ball is swung over by Charles Dunne.63:46
Jeff Schlupp has an effort at goal and missed to the left of the goal.61:32
Marvin McCoy takes the free kick.60:59
Free kick awarded for an unfair challenge on Stuart Lewis by Anthony Knockaert.60:45 Substitution
Substitution Jeff Schlupp comes on in place of David Nugent.59:43
Corner from the left by-line taken by Lloyd Dyer.59:30
Lloyd Dyer takes a shot. A parry by Matt Ingram prevents the goal.58:54
Free kick awarded for an unfair challenge on Lloyd Dyer by Jo Kuffour.57:51
Free kick crossed by Josh Scowen.57:29
Unfair challenge on Dean Morgan by Andy King results in a free kick.56:39
Matt Ingram restarts play with the free kick.55:52
The offside flag is raised against Chris Wood.55:37
The ball is swung over by Ritchie De Laet.55:19
Free kick taken by Wes Morgan.55:00
Foul by Kortney Hause on Chris Wood, free kick awarded.53:20
Free kick taken by Stuart Lewis.53:05
Neil Danns gives away a free kick for an unfair challenge on Dean Morgan.50:59 Substitution
Substitution (Leicester) makes a substitution, with Anthony Knockaert coming on for Matty James.49:23
Charles Dunne manages to make a clearance.49:13
Corner taken by Matty James from the left by-line.47:56
David Nugent crosses the ball in from the free kick.47:01
Stuart Lewis concedes a free kick for a foul on Lloyd Dyer.45:01
The referee blows the whistle to start the second half.45:00 +1:45 Half time
Half Time The half-time whistle blows.45:00 +1:09
Free kick taken by Matt Ingram.45:00 +0:57
Chris Wood gives away a free kick for an unfair challenge on Dean Morgan.44:25
Free kick crossed by Josh Scowen.44:01
Sean St. Ledger gives away a free kick for an unfair challenge on Steven Craig.43:09
Header by Wes Morgan goes harmlessly over the bar.43:01
Corner taken by Matty James from the right by-line.42:40
Kortney Hause makes a clearance.42:29
The ball is crossed by Ritchie De Laet.41:44
Wes Morgan takes the free kick.41:40
Steven Craig is flagged offside by the assistant referee.41:07
Shot by Charles Dunne. Kasper Schmeichel parries the ball away.40:53
Matt Spring restarts play with the free kick.40:32
Foul by Neil Danns on Jo Kuffour, free kick awarded.40:00
Free kick taken by Kortney Hause.39:45
Chris Wood is flagged offside by the assistant referee.39:32
Matt Spring restarts play with the free kick.39:21
Wes Morgan gives away a free kick for an unfair challenge on Steven Craig.37:44
Free kick taken by Matt Ingram.36:54
The ball is delivered by Jo Kuffour.36:38
Kasper Schmeichel restarts play with the free kick.36:18
The official flags Steven Craig offside.34:49
Josh Scowen takes the free kick.34:31
Free kick awarded for an unfair challenge on Josh Scowen by Matty James.33:49
Anthony Stewart takes the free kick.33:35
Free kick awarded for a foul by Liam Moore on Dean Morgan.33:12
Free kick taken by Kasper Schmeichel.33:01
The referee blows for offside.32:24
Clearance made by Marvin McCoy.32:18
The ball is sent over by Ritchie De Laet.31:13
Free kick crossed by Kasper Schmeichel.31:00
Free kick awarded for a foul by Dean Morgan on Lloyd Dyer.30:28
Free kick taken by Josh Scowen.30:02
Steven Craig fouled by Sean St. Ledger, the ref awards a free kick.27:35
The ball is swung over by Charles Dunne.24:23
Shot by Neil Danns missed to the right of the net.20:54 Goal scored
Goal! - Jo Kuffour - Wycombe 1 - 1 Leicester Jo Kuffour scores with their right foot. Wycombe 1-1 Leicester.17:50
Matt Spring takes the free kick.17:33
The official flags Chris Wood offside.17:06
Corner taken by Josh Scowen from the right by-line.16:32
Dean Morgan has an effort at goal. Kasper Schmeichel parries the effort to safety.15:05
Charles Dunne sends in a cross.13:04 Goal scored
Goal! - David Nugent - Wycombe 0 - 1 Leicester David Nugent scores a penalty. Wycombe 0-1 Leicester.12:36
Stuart Lewis concedes a Penalty for a foul on Andy King.10:24
The ball is crossed by Marvin McCoy.7:41
Shot by Matty James went wide of the left-hand post.4:21
Dean Morgan takes the free kick.4:01
David Nugent concedes a free kick for a foul on Matt Spring.3:44
Free kick taken by Kasper Schmeichel.3:31
Ritchie De Laet fouled by Charles Dunne, the ref awards a free kick.3:05
Free kick taken by Matt Ingram.2:51
Unfair challenge on Marvin McCoy by Chris Wood results in a free kick.1:01
Dean Morgan fires a strike on goal direct from the free kick over the bar.0:24
Foul by Matty James on Charles Dunne, free kick awarded.0:00
The ref blows the whistle to start the match.
Live data and text provided by our data suppliers