A dominant Pompey were knocked out of the Checkatrade Trophy following a dramatic conclusion at Fratton Park.
They created a host of excellent chances in the first half and it was somewhat of a surprise that the sides went in level at the break.
But Belgian starlet Charly Musonda netted following a counter-attack for the Londoners and that looked to be it.
Substitute Brett Pitman levelled in stoppage-time, however, and the third round tie looked to be heading for penalties.
But there were still time for Musonda to curl home a fine free-kick and ensure it was the visitors who progressed to the quarter-finals.
Kenny Jackett made one change from the side that were beaten at Bristol Rovers on New Year’s Day.
Connor Ronan was handed a debut in place of Pitman, while fellow Wolves loanee Sylvain Deslandes was named among the substitutes.
Pompey were on top throughout the first half and the only negative from a confident performance was that they failed to break the deadlock.
An early effort from Ben Close set the tone for what was to come, with the ball hitting Trevoh Chalobah and ricocheting wide.
The hosts were passing the ball around nicely and one move ended with a snap-shot from the lively Ronan, forcing Marcin Bulka to get down to his right and make the save.
Chelsea’s only threat arrived following a quick break on 17 minutes, but Callum Hudson-Odoi could not beat Luke McGee at the keeper’s near post.
A series of corners led to problems at the other end, with decent deliveries from Matty Kennedy and Dion Donohue causing some nervy moments in the Londoners’ defence.
The fans in the North Stand Lower were being entertained and the Blues had three excellent opportunities to forge ahead in the space of a few seconds.
Bulka twice came to Chelsea’s rescue by keeping out a header and shot from Oliver Hawkins with smart saves.
Sandwiched between them was a sharp volley from Jamal Lowe that had to be cleared from the line by a well-placed Kyle Scott.
Still the chances kept coming and when Close tapped a free-kick to Ronan, the diminutive midfielder fired narrowly over the bar.
Chelsea U21 0
Pompey picked up where they left off after the interval and another opportunity was carved open by one of Matt Clarke’s trademark surging runs.
He sprinted more than half of the length of the pitch and played a neat one-two with Kennedy before laying the ball off to Ronan, who saw his effort blocked.
Jackett made a double switch on 53 minutes, with Hawkins and a limping Nathan Thompson making way for Kal Naismith and Pitman.
The Blues had been pretty dominant as the game approached the hour mark, only to then find themselves trailing.
Chelsea broke quickly down the left and Scott cut the ball back for Musonda to calmly steer past McGee and into the net.
It was still the hosts looking the more confident side, but they were not creating as many clear openings as in the first half.
A Ronan free-kick almost proved fruitful, however, with Pitman’s back-flick blocked and the same fate then befell his ambitious over-head effort.
The danger was not over, though, and when the ball bounced up and hit Ethan Ampadu on the arm, referee Gavin Ward ignored cries for a penalty.
But it took a superb save from McGee to stop Chelsea doubling their lead on 73 minutes, with the keeper flinging out an arm to somehow deny Scott from point-blank range.
Conor Chaplin came on for Ronan, as Jackett tried to inject some extra attacking impetus into his line-up.
And the striker thought he should have won a spot-kick when he went down under Ampadu’s challenge, only for Ward to again remain unmoved.
Pompey did level in added time, though, when PITMAN collected Kennedy’s cross and turned sharply before firing home.
It looked like penalties were on the cards, but when Christian Burgess crudely halted Hudson-Odoi’s surge, Musonda stepped up to curl in an impressive winner.
Pompey (4-2-3-1): McGee; Thompson (c) (Pitman 53), Burgess, Clarke, Donohue; Close, May; Lowe, Ronan (Chaplin 76), Kennedy; Hawkins (Naismith 53)
Goals: Pitman 90+2
Subs not used: Bass, Deslandes, Widdrington, Bennett
Chelsea U21 (4-3-3): Bulka; Sterling, Chalobah, Ampadu, Grant (Colley 83); Maddox (Redan 28), Sammut (c), Scott (McCormick 87); Musonda, St Clair, Hudson-Odoi
Goals: Musonda 58, 90+5
Subs not used: Cumming, Dasilva, Christie-Davies, Hazard
Referee: Gavin Ward
Attendance: 3,116 (113 away fans)