Manchester City made it to the last four in the Carabao Cup
Jamie Vardy scored a controversial spot-kick in the sixth minute of added time to take the quarter-final into extra-time.
But both he and Riyad Mahrez missed in the ABBA-style shoot-out as Pep Guardiola’s men triumphed 4-3.
Guardiola’s side had looked certain to extend their winning run in domestic action to 19 games this season when Bernardo Silva’s first-half goal gave them a 1-0 lead with 90 minutes on the clock.
But they were stunned to see referee Bobby Madley indicate at least eight minutes of added time.
And six minutes into the additional spell, Demarai Gray was adjudged controversially to have been fouled by fellow substitute Kyle Walker and Vardy found the bottom corner from the spot.
Leicester started well but it was the visitors who should have led on 13 minutes as a crossfield pass by Christian Fuchs was intercepted by Silva, who forced Leicester goalkeeper Ben Hamer into the first save of the night.
Then a rash charge from his goal by Hamer left the Leicester goal undefended with Manchester City in possession, but Harry Maguire recovered well to block Ilkay Gundogan’s shot on the line.
The rebound fell for Silva, who dragged his follow-up effort wide.
Gundogan tried to embarrass Hamer on 20 minutes when he spotted the goalkeeper out of position and tried to beat him with a delicate chip.
But Hamer backpeddled effectively to tip the ball over the crossbar.
The visitors claimed the lead in the 26th minute as their former player Kelechi Iheanacho played his part in putting Leicester in trouble.
Yaya Toure combined with Gundogan to pick the pocket of their ex-colleague on halfway, Gundogan powered forwards and released Silva, who beat Hamer with a neat, low finish.
Leicester had faded from the game yet they almost claimed an equaliser from nowhere nine minutes from half-time.
Iheanacho played a neat one-two with Shinji Okazaki and tried a right-footed shot that was turned away well by Claudio Bravo.
Early in the second half Leicester’s Ben Chilwell was left bleeding after tried to get his head to a clearance from a Fuchs long throw.
The stooping Chilwell got a boot in the face from Gabriel Jesus and his effort went over the bar shortly after Maguire’s glancing header was cleared off the line.
Jesus was in the thick of the action at the other end moments later when he chased a through-ball and clattered into Hamer, leaving the goalkeeper needing treatment.
Gundogan was then booked for diving on the edge of the Leicester 18-yard before and Eliaquim Mangala was fortunate to escape with only a warning after catching Okazaki with a clumsy forearm.
Yet it was Guardiola’s men who went closest to another goal with Jesus glancing a header just wide from a Gundogan free-kick.
Leicester’s stewards were called into action late on to drag away a pitch invader who slipped as he jogged towards the dugouts.
Sadly for the Foxes, the visitors’ defence proved just as tough with Bravo saving a late effort from substitute Riyad Mahrez.
But referee Madley upset the visitors by allowing eight minutes of added time, then infuriated them by awarding a penalty in the 96th minute when Walker made the slightest contact with the heel of fellow substitute Gray, who took the chance to go down.
Vardy made no mistake to take the game into extra time.
The Foxes had the better of the opening period with Maguire heading just wide from a Mahrez free-kick and Vardy charging down a Bravo clearance, with the rebound flashing inches off target.
And in the second period Bravo saved well from Mahrez.
Leicester (4-4-1-1): Hamer; Amartey, Dragovic (Benalouane 111), Maguire, Fuchs; Albrighton (Mahrez 57), King, Iborra, Chilwell (Gray 72); Okazaki; Iheanacho (Vardy 57). Subs not used: Simpson, Jakupovic, Ulloa, Benalouane. Booked: Iheanacho, Maguire. Goal: Vardy (90+6)
Manchester City (4-3-3): Bravo; Danilo, Mangala (Walker 81), Adarabioyo, Zinchenko; Gundogan, Toure, Foden (Dele-Bashiru 90); Diaz (Nmecha 88), Jesus, B Silva. Subs not used: Delph, Sane, Ederson, Duhaney. Booked: Gundogan, Walker, Danilo. Goal: Silva (26).
Referee: R Madley (West Yorkshire)