Colchester capitalised on Portsmouth's early defensive frailties to earn their first away league win since October.
The U's were ahead after just two minutes when Gavin Massey turned home Freddie Sears's cross, but Jed Wallace volleyed home an equaliser soon after.
Pompey debutant Sam Sodje then felled Sears in the box, who scored the penalty himself before Massey struck the visitors' third after 20 minutes.
James Keene blasted home to reduce the deficit, but the U's held on.
VIEWS FROM THE DRESSING ROOM
Portsmouth caretaker manager Guy Whittingham told BBC Radio Solent:
"There was no commitment to anything, you can't excuse that in a football game.
"It's what football is about, it's what makes winners and losers and we had none of that in the first half.
"We try to tell them (the players) that the fans will support you, all you've got to do is be committed.
"They'll give and take on the losing front but if you don't commit that's when they're not happy."