Joe Ironside opened the scoring with a 38th-minute header and Cambridge doubled their lead courtesy of Liam O'Neil in the 69th minute. Portsmouth were on the scoresheet seven minutes later via Ronan Curtis.
The victory sends the U's up to 13th in the EFL League One table following their third win in their last four games, two places ahead of Pompey.
Story of the match
Conor Masterson also made a key defensive play, clearing with his head when Lee Brown tried to pick out Harrison at the back post. It was one-way traffic, as Pompey had some neat passage of play as they sought a breakthrough.
But, against the run of play, the U's were in front. Ironside hung in the air to meet a cross from George Williams, sending a looping header over Portsmouth goalkeeper Gavin Bazunu and into the net.
And the visitors might have had a second before the break, with Bazunu getting down to deal with a long-range drive from former Pompey academy graduate Adam May.
The visitors appeared more than happy to sit back deep inside their own half when the action restarted, which meant the hosts continued to have the freedom of most of the pitch.
One break did provide an opening, as Harness found Harrison who slid the ball across goal for the advancing Ryan Tunnicliffe, only for Cambridge goalkeeper Dimitar Mitov to beat him to the ball.
The U's threatened when a May corner was met by Ironside, but his header was deflected behind off Mahlon Romeo. In the 69th minute, Cambridge doubled their lead.
May’s corner was only cleared as far as O’Neil on the edge of the box and he hit a half-volley past Bazunu and into the top corner to make it 2-0.
George Hirst went down in the box under pressure from two U's defenders moments later, but his penalty shouts were ignored by referee Gavin Ward.
And the striker then saw a shot blocked inside the box, only for the Blues to score just a few seconds later as Curtis ran onto a loose ball and he struck from a tight angle to cut the lead in half.
Portsmouth went searching for an equalizer, but Hirst’s shot lacked power after a neat turn on the edge of the area and Mitov saved comfortably. In what was their last chance, Sean Raggett then headed over from a Harness free-kick.
Man of the match: Adam May
The former Portsmouth academy graduate wanted to play a part in leading his new club to victory over his old one and he certainly did, providing excellent service throughout the game.