Trailing 1-0 in the play-off semi-final thanks to Peter Whittingham's exquisite free-kick in Sunday's first leg at the Walkers Stadium, the Foxes found themselves with a mountain to climb as Michael Chopra doubled the Bluebirds' advantage.
But, aided by the unplayable Steve Howard, they fought back to take a 3-2 aggregate lead courtesy of Matty Fryatt, an own goal from Bluebirds captain Mark Hudson and Andy King.
Yet, in a dramatic tussle to match that off Nottingham Forest and Blackpool last night, Whittingham took the tie to extra time with his 25th of the season from the penalty spot to make it 3-3 on aggregate.
A goalless extra period followed before Cardiff came out on top in a tense shootout after David Marshall saved from Yann Kermorgant and Martyn Waghorn.
Cardiff, whose financial struggles have been well documented this season, are now one game away from their first return to the top flight since 1962 and becoming the first non-English team to participate in the Premier League.
Manager Dave Jones admitted earlier this week that promotion would be "life changing for everybody in south Wales" and his side are now just 90 minutes away from that.
But plaudits must also go to Leicester who battled back strongly when the game looked beyond them.
With the Foxes needing to win manager Nigel Pearson showed his attacking intent by changing formation and starting with the returning Howard and the recalled Fryatt in attack.
Counterpart Jones opted to keep faith with the same starting XI that secured the Bluebirds' slender lead from the first leg.
Welsh patriotism was aplenty prior to kick-off as a record home crowd tried to match the intimidating atmosphere of their former stomping ground Ninian Park.
And with just four minutes on the clock Whittingham could and should have capitalised to grab his second of the tie but he fired wide having been sent clear.
The hosts were a class above their east midlands opponents in the opening quarter and it was just a matter of time before they found the net.
And so it proved after 22 minutes.
An unchallenged Bothroyd - who was immense throughout - flicked on a long ball from Stephen McPhail and Chopra lost his man with ease to race through and put through Chris Weale's legs.
Yet their lead was to last just three minutes as Fryatt latched onto Howard's header to volley past the despairing arm of Marshall and watch the ball roll slowly over the line.
And 11 minutes later - out of nowhere - the Foxes had levelled things up on aggregate as Howard's flick-on from Alex Bruce's free-kick again caused problems and the ball bounced off Hudson's head and over a stranded Marshall.
The visitors had certainly grown in confidence since their opening goal of the night and they found themselves in front for the first time in the tie four minutes after the restart when King headed home Paul Gallagher's cross from the right.
With the next goal crucial chances came at either end, Whittingham clearing a goalmouth scramble off the line.
And the Championship's top scorer soon proved his coolness in the opposite penalty area, converting a 69th-minute penalty after Chopra had been felled by Bruce.
The Cardiff City Stadium was electric and Bothroyd rifled an effort off the crossbar after a strong solo run before Chopra saw his effort unknowingly diverted wide by Jack Hobbs.
Whittingham then cannoned a free-kick off the woodwork as he looked to have the last say, while Leicester substitute Waghorn saw his corner palmed onto the near post by Marshall as a dramatic 90 minutes was brought to a close.
The two teams could not separated in extra time and it was left for Cardiff to snatch a typically tense play-off semi-final on penalties.