Wes Morgan gave Leicester an FA Cup lifeline after his late equaliser denied Derby in a 2-2 draw at Pride Park.
The former Nottingham Forest defender headed home with four minutes remaining when it looked like Craig Bryson's lovely individual goal just before half-time would send the Premier League champions crashing out.
Earlier in the first half Darren Bent scored at both ends, presenting Leicester the lead with a bizarre own goal before making amends with a glancing header.
Leicester led after eight minutes through Bent's own goal. The striker sliced his attempted goal line clearance into the net after Robert Huth's header struck Chris Baird and bounced towards the net.
He soon had a chance to redeem himself following good work by Johnny Russell, who cut into the penalty area from the left, but he scuffed his shot eight yards out.
However, Bent straightened things out after 21 minutes, proving he is much more effective at the other end, glancing home a header from Will Hughes' clipped cross.
Shinji Okazaki's driving run and shot brought a fine fingertip save from Scott Carson as he helped the shot over the crossbar before a similar surge forward from Jamie Vardy saw his shot deflected just wide.
Derby deservedly led at the break after Bryson's strike. The midfielder won the ball 30 yards from goal before breaking into the penalty area past Morgan and sending a left-footed shot beyond Kasper Schmeichel and into the far corner of the net.
Leicester boss Claudio Ranieri made an attacking change at half-time with Demarai Gray replacing Christian Fuchs and it almost paid dividends immediately.
The Italian must have been wondering how his side were not level after Derby survived a series of scares at the start of the second half.
Okazaki went close with a header before Gray shot straight at Carson, who was out of position on the ground. Leicester attacked again and Gray saw a shot from the left side of the box come back off the far post and this time Okazaki sent the rebound straight at the grounded Carson.
It was Leicester's turn to have a let off just before the hour as Russell put a diving header wide from six yards out after a beautiful ball from Baird.
Back at the other end, Carson was in the right place again to catch Vardy's powerful header after Derby switched off from a throw-in.
Leicester were much improved in the second half and deservedly equalised when Morgan headed home Gray's inswinging corner three minutes from time.
Huth survived a penalty appeal when Tom Ince's effort struck his hand but referee Mark Clattenburg gave nothing and the two sides will do it all over again in a replay at the King Power Stadium next month.