The South Korea international, on loan at the Stadium of Light from Swansea, struck in the final minute of extra time to complete a famous 2-1 win and end Jose Mourinho's hopes of winning the trophy which gave him his first honour during his previous spell at Stamford Bridge.
Lee Cattermole's own goal looked to have sent Chelsea through to the last four until substitute Fabio Borini struck with just two minutes of normal time remaining to send the tie into extra time.
Indeed, the Italian might have won it in stoppage time had it not been for Gary Cahill's desperate challenge with the Black Cats mounting a late charge.
But Mourinho will have been fuming after the visitors had entered the closing stages of the initial 90 minutes in control and having squandered chances to kill the tie off.
They had taken the lead when the unfortunate Cattermole bundled Cesar Azpilicueta's 46th-minute cross past goalkeeper Vito Mannone under pressure from Frank Lampard.
Referee Anthony Taylor, if he needed it, was alerted to the fact that the ball had crossed the line by the new technology in place in League Cup for the first time, with replays later confirming the Sunderland man had got the decisive touch.
The Black Cats have now scored six own goals in 11 games, a tally manager Gus Poyet believes is not simply down to ill fortune, although Cattermole was certainly out of luck on this occasion.
However, Borini snatched an 88th-minute leveller after Jozy Altidore's shot had been blocked to set the stage for substitute Ki.
The midfielder, a 63rd-minute replacement for Craig Gardner, had already forced a brilliant save from Mark Schwarzer, but needed not second invitation when the ball arrived at his feet with just seconds of extra time remaining.
Both sides enjoyed periods of first-half possession, but apart from an early flurry during which Mannone had to field long-range efforts from Andre Schurrle and Willian, neither goalkeeper was called upon in earnest.
Poyet had deployed Cattermole in front of his back four and the ploy served to frustrate Chelsea, who saw plenty of the ball, but struggled to find space in and around the penalty area.
What good work they did came largely courtesy of Willian and Schurrle with the latter drilling an 18th-minute ball across the face of goal, but crucially beyond the supporting blue shirts.
The Black Cats gradually grew into the game and with Emanuele Giaccherini and lone striker Altidore causing problems for the visitors' back four, created half-chances of their own.
The Italy international might have done better when he met Sebastian Larsson's 20th-minute free-kick beyond the far post, only to scuff his effort, and he blazed high into the stand after side-stepping John Obi Mikel with a minute of the first half remaining.
However, the deadlock was broken within 39 seconds of the restart, and it came from a familiar source.
Full-back Azpilicueta broke into space on the right and drilled the ball across goal, where Cattermole got the decisive touch.
Samuel Eto'o could have killed the tie off within minutes after he found himself in on goal with just Mannone to beat, but he steered his right-foot attempt wide of the post.
He went close again seconds later when his drive looped up off defender John O'Shea and landed on the roof of the net, and Mannone had to make a solid save to push Kevin De Bruyne's well-struck 56th-minute effort around the post.
Cattermole did call veteran keeper Mark Schwarzer into action with a rasping 30-yard drive, but Mannone had to turn away another Schurrle strike 12 minutes from time.
But it was Borini found himself in the right place at the right time to latch on to Altidore's blocked shot and blast home the equaliser.
The Italian might have won it in injury time had it not been for Cahill's last-gasp challenge, but Mannone had to save from Luiz four minutes into extra-time.
Borini stabbed wide from Andrea Dossena's deep cross, but Michael Essien repelled Altidore's goal-bound effort after he had helped on Ki's shot.
Schwarzer produced a superb save to keep out Ki's 114th-minute header, but there was nothing the 41-year-old could do to deny him five minutes later when he cut inside from Borini's past and thumped the ball into the bottom corner.