Paolo Di Canio came back to haunt Portsmouth manager Harry Redknapp as he stepped off the bench to inspire Charlton to an unlikely win on the south coast.
Portsmouth were cruising to victory when Di Canio and Jonathan Fortune were introduced into the action in the 64th minute and should have had more to show for their efforts than Teddy Sheringham's first-half strike.
They were made to rue their missed chances as Fortune levelled the scores in the 77th minute with only his third senior goal before Di Canio set Shaun Bartlett to score Charlton's winner in the final minute.
Di Canio, whose career was rescued by Redknapp when he was in charge of West Ham, delivered a pinpoint corner to the far post for Bartlett to send a free header past the despairing dive of goalkeeper Shaka Hislop from eight yards out.
It was the first time Charlton had recorded back to back victories in 17 games.
Bartlett's late strike condemned Portsmouth to a third successive defeat and Redknapp was left shaking his head in disbelief at the final whistle as to how his side had lost.
"I've never been as proud of a team as I was in the first half," he said.
"We played some wonderful stuff then and how we have ended up losing I will never know. We conceded two poor goals." Charlton goalkeeper Dean Kiely had to be at his best to deny Sheringham in the 13th minute when he tipped over a crisply hit drive that was heading for the top left-hand corner of the net.
Patrik Berger and Yakubu Ayegbeni were also causing havoc and it was no surprise when Sheringham headed the home side in front in the 34th minute rising to meat substitute Tim Sherwood's inswinging corner at the near post.
Berger should have added a second on the hour mark but headed over from just eight yards out while Jason Roberts also went close and Fortune and Di Canio made Pompey pay for not taking their opportunities.
Fortune equalised from close range following a long throw in from the right before Bartlett produced the perfect finale for the visitors in front of the 1,000 travelling supporters.