The Mariners looked out of sorts as they struggled to threaten the visitors’ goal in the first half and they were made to pay three minutes before the break when George Taft put Cambridge ahead.
Town looked for a response after the interval but when the game’s second goal came nine minutes from time, it was the away side who doubled their advantage through substitute Rushian Hepburn-Murphy.
Three changes were made to the Town starting XI after last week’s draw at Swindon, with Kristian Dennis handed his first start as Jordan Cook dropped to the bench.
The other alterations saw Harry Clifton come into the line-up in place of Martyn Woolford, while Reece Hall-Johnson replaced the suspended Ludvig Ohman.
James McKeown started in goal, with Luke Hendrie, Hall-Johnson, Harry Davis, Danny Collins and Sebastian Ring forming the defence.
Clifton, Jake Hessenthaler and Elliot Embleton were the midfielders, with Dennis joined in attack by Wes Thomas.
The substitutes were Cook, Joe Grayson, Harry Cardwell, Charles Vernam, Ahkeem Rose, Sam Russell and Alex Whitmore.
Cambridge began the day 19th in League Two, six points ahead of the relegation zone and 11 behind the 11th-placed Mariners.
Town took control of possession in the early stages of the game before Cambridge began to come into the contest, although neither side was able to register an attempt at goal before the 10-minute mark.
A cross from Clifton was headed away by defender Brad Halliday at the far post for a corner on 14 minutes but after an initial short delivery, the cross was blocked for a throw-in.
Visiting keeper Dimitar Mitov was called into action for the first time on 19 minutes, when he made a comfortable stop at his near post after Dennis shot from a narrow angle.
A cross from Ring on the left dropped onto the roof of the net soon afterwards as the hosts continued to attack.
Dennis forced another save from Mitov after a cross from Clifton found its way to him, before a Cambridge attack ended when a shot by George Maris from 25 yards flew out for a goal kick.
McKeown’s first real action of the game came on 25 minutes, when he did well to deny David Amoo, pushing his shot up into the air before Collins got back to get it away for a corner.
A cross from Clifton just after the half-hour was too high for Hendrie, before the visitors won a corner soon afterwards after Hall-Johnson had done well to halt a counter-attack.
Cambridge were starting to show some good build-up play without seriously threatening the Mariners defence, while the hosts were also struggling to cause problems in the final third of the pitch.
Embleton was spoken to by the referee after a foul on Reggie Lambe on the away left on 42 minutes and from the resulting free kick, Cambridge took the lead as the ball was met by tall defender TAFT and his header bounced into the top corner of the net.
One added minute was played at th end of the half and with no further chances for either side, the visitors held the advantage at the break.
No changes were made before the restart and the first shot of tthe second half was hit by Embleton from the edge of the penalty area but was blocked.
A foul on Ring gave Town a free kick in a central area inside the Cambridge half on 54 minutes but Embleton’s delivery was cleared by Greg Taylor.
Maris then fired high and wide at the other end after another good build-up by the visitors.
Cambridge captain Gary Deegan was booked for a foul on Clifton but Town were unable to profit from the resulting free kick.
Maris then had another chance as Maris ran into the box but Hall-Johnson did well to get back and put in a challenge, before a shot from the midfielder was saved by McKeown.
Rushian Hepburn-Murphy replaced Amoo as the away side made the first substitution of the afternoon on 65 minutes.
Hall-Johnson was tripped by Maris near the edge of the box two minutes later and Town made a change before the free kick was taken, as Cook replaced Clifton. Embleton’s free kick flew just off-target.
Hessenthaler was shown the yellow card for a combination of fouls, then as the Mariners attacked again, a foul on the left edge of the box brought a free kick which was headed clear at the far post.
Hendrie won a corner on the right on 75 minutes and Hessenthaler’s far-post delivery from it was good but Cambridge manage to scramble the ball clear before a return ball into the box from Ring went out for a goal kick.
Jabo Ibhere and Lambe were replaced by Paul Lewis and Hayden Coulson for Cambridge, before Vernam was sent on in place of Embleton for Town with 12 minutes left to play.
A foul by Hendrie on Taylor gave the visitors a free kick in a promising position on the left but Maris’ ball into the box was comfortably caught by McKeown.
But the away side were not to be denied for much longer as they grabbed a deserved second goal on 81 minutes. A through-ball for HEPBURN-MURPHY led to him powering into the box, before firing a low shot past McKeown and into the bottom corner of the net.
Cardwell came on for Hall-Johnson and Town pushed forward in a bid to get back into the game but they almost conceded a third goal when Hepburn-Murphy broke clear before passing to Coulson, whose shot went just past the far post.
But after four added minutes, the away side were able to celebrate a rare away win as Town were left to reflect on a defeat for the first time since the 3-0 reverse at Forest Green Rovers in January.
The Mariners are next in action on Saturday, when they travel to Crawley Town.