Second-half goals from Cengiz Under, Youri Tielemans and James Maddison saw Leicester come from behind to knock out cup specialists Brentford 3-1.
The Championship Bees, who shocked four Premier League sides on their way to this season's Carabao Cup semi-finals, were threatening to add the Foxes to their list of scalps when they led through Mads Bech Sorensen's early goal.
But whatever City boss Brendan Rodgers said at half-time did the trick because just six minutes into the second half they were in front, before going on to comfortably book a home meeting with Brighton in the fifth round.
Leicester, without injured top scorer Jamie Vardy, made eight changes but England midfielder Maddison kept his place and was instrumental in their comeback.
The visitors threatened in the opening moments when Under charged to the byline and pulled the ball back for Ayoze Perez, whose first-time volley flew just wide.
But it was Brentford who went ahead with their first attack after Leicester failed to clear Vitaly Janelt's corner.
Defender Sorensen was quickest to react to the loose ball and poked it past Foxes keeper Danny Ward from close range.
The hosts could have added to their lead in the first half, notably from another Janelt corner which found its way to Tariqe Fosu at the far post, but Ward got down well to block his effort.
Saman Ghoddos then whistled one free-kick narrowly over before forcing Ward to tip a second over the crossbar before half-time.
Leicester had offered little in the opening 45 minutes, but that changed just 48 seconds after the restart.
Maddison weaved through the Brentford rearguard to the edge of the area before teeing up Under, who powerfully fired home past Luke Daniels.
Moments later Perez headed a Tielemans cross over before Daniels saved Harvey Barnes' fierce drive.
Then, in the 51st minute, Tielemans was tripped in the area by Fosu and the Belgium midfielder sent Daniels the wrong way with the spot-kick.
Under should have added Leicester's third when Ricardo Pereira pulled the ball back to him but the Turkey midfielder side-footed wide from 12 yards out.
Instead Maddison killed off the tie with 20 minutes remaining when he tapped in the rebound after Barnes' shot was saved.