Demarai Gray capped a dazzling individual display by scoring the final goal as Leicester edged past Derby 3-1 in extra-time in their FA Cup fourth-round replay.
Andy King headed the Foxes in front early in the second half, only for Abdoul Camara to level with a free-kick that took a wicked deflection off Ben Chilwell.
Wilfred Ndidi was introduced at the beginning of extra-time and he restored Leicester's advantage in the 94th minute with his first goal for the club since joining in January.
Gray then sealed victory with a fine solo effort that saw him skip between two defenders and finish into the corner.
The Foxes will now travel to Millwall in the fifth round on the weekend of February 18.
While Claudio Ranieri showed the Premier League is his priority by making 10 changes, the cup win will still provide some relief in a week that Leicester's owners made clear their "unwavering support" for the Italian.
Focus now for last season's Premier League champions turns to their clash with relegation rivals Swansea on Sunday, live on Sky Sports.
Live Nissan Super Sunday
While Leicester fans chanted their support for Ranieri and club owner Vichai Srivaddhanaprabha watched from the stands, there was little for either set of supporters to get too excited about in the first half.
Daniel Amartey looped an early header onto the roof of the net for Leicester while Camara curled a shot wide at the other end.
The Foxes had a penalty appeal turned down when Ahmed Musa was bundled over by Jason Shackell before Gray's cross was almost turned in by Musa on the stretch.
Chilwell was then barged over by Richard Keogh in the box, but again the appeals were waved away, before home 'keeper Ron-Robert Zieler was called into action in injury-time to tip a shot from Jacob Butterfield wide of the post.
Leicester broke the deadlock less than a minute into the second half as Gray's cross to the back post was headed into the middle by Marc Albrighton for King to nod in from close range.
But the Foxes were unable to maintain their advantage as Camara's free-kick on the hour mark took a wicked deflection off Chilwell that sent it past the wrong-footed Zieler.
Neither side created a clear opportunity to win the match in normal time, although Derby goalkeeper Jonathan Mitchell was fortunate not to be penalised when he came out of his area to close down Musa and clearly blocked the ball with his hand.
Musa then headed at Mitchell from a tight angle in the 89th minute before Max Lowe chested the ball against the post as he looked to turn it back towards his keeper.
Islam Slimani and Ndidi were introduced at full-time and it was the latter who put Leicester ahead again, firing home from 25 yards in the 95th minute.
Slimani missed a glorious chance to make it 3-1 when he failed to tap in Gray's cross from two yards out.
But Gray made sure of victory in the 115th minute with a superb solo goal, jinking between two defenders and then finishing into the corner.