Jamie Vardy's early brace put the visitors in dreamland but Alex Oxlade-Chamberlain hit back shortly after.
A stunning strike from James Maddison put Leicester 3-1 up at half time but a goal from Diogo Jota ensured it would be a grandstand finish to normal time.
And in the fourth minute of stoppage-time Takumi Minamino struck to take the tie to a shootout.
Minamino then missed the chance to score the decisive penalty as he skied the Reds' fifth spot-kick. But Liverpool's win was sealed as Diogo Jota slotted his in after Caoimhin Kelleher saves Ryan Bertrand's poor effort.
However, Liverpool may have got the luck they were lacking at the weekend with Tyler Morton avoiding a red card for a firm challenge on Ricardo Pereira. The Foxes full-back later hobbled off the pitch.
Kelleher proved to be the hero but he had a nightmare start as he was somewhat culpable for Vardy's goals.
On nine minutes, Vardy fired the ball through the Irishman's right hand before doubling Leicester's lead as he fired in Patson Daka's cross that Kelleher perhaps could've collected before it reached the English striker.
Liverpool rightly had a grievance that Harry Kane wasn't sent off for his firm tackle on Andy Robertson but Jurgen Klopp's men were beneficiaries this time with Morton's challenge, which contributed to Pereira's early exit from the game, only deemed worthy of a yellow card.
Oxlade-Chamberlain pulled one back just shy of the 20-minute mark as he swept home Roberto Firmino's lay-off but Brendan Rodgers' men restored their two-goal lead in spectacular style.
The ball fell to Maddison, who expertly fired the ball over Kelleher, the ball taking a dip at the last moment and into the Kop end net.
Reds boss Jurgen Klopp had made ten changes to the team that drew at Tottenham but introduced three more senior names into the side with Ibrahima Konate, James Milner and Diogo Jota coming on at the start of the second half.
And it was Jota who made a particularly good impact as he reduced Liverpool's deficit again with a powerful shot with his left peg midway through the second half.
It appeared Leicester were going to hold off the Liverpool siege but Minamino, who had scored three goals in the Merseysiders' Carabao Cup campaign, popped up with the equaliser, a well-taken effort with the outside of the boot in the fourth of six minutes of stoppage-time.
So off to penalties it went and Minamino had the chance to seal the win after Kelleher kept out Luke Thomas' penalty. However, the Japan international's spot-kick struck the top of the crossbar and into the Anfield Road End.
But Leicester couldn't make them pay as Kelleher saved Bertrand's meek effort and Jota fired into the corner to send the Anfield faithful into raptures.
Liverpool face Arsenal in the semi-finals. Meanwhile, Chelsea, who beat Brentford, take on Tottenham, who beat West Ham.
Ties will take place in the week commencing January 3 and January 10.