Wycombe 1-2 Leicester
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."