Wes Hoolahan came off the Cambridge bench as the League One side sent Premier League strugglers crashing out of the FA Cup at the third round stage.
Joe Ironside gatecrashed Kieran Trippier's party as the home fans watched on in dismay at St James’ Park.
The England full-back was handed a Magpies debut a day after completing his move from Atletico Madrid, but celebrations over his arrival turned sour as Cambridge heaped further misery on Eddie Howe’s relegation-threatened side.
Ironside made the most of some less than effective defending to score the game’s only goal with 56 minutes gone and Newcastle, who had earlier seen Fabian Schar and Jacob Murphy strikes correctly ruled out for offside, were unable to muster an effective response in front of a bumper crowd of 51,395.
For the visitors, who sit in 16th place in the third tier, it proved to be a famous afternoon as they booked a place in the fourth round in fairytale fashion with keeper Dimitar Mitov producing a string of fine saves, one of them a stunning effort to keep out Joelinton’s injury-time header.
Former Republic of Ireland international Hoolahan was a 61st minute substitute, replacing Ben Worman with his team in the lead.
Trippier made his presence felt vocally as well as on the ball as a promising start by the Premier League side fell victim to a series of errors, and the Magpies were fortunate not to be made to pay for a lack of concentration which allowed visiting full-back George Williams a free header from a 16th-minute short corner.
Allan Saint-Maximin, who had earlier dragged an attempt wide, was unable to hit the target after meeting Murphy’s cross at full-stretch two minutes later, and he just failed to get on the end of Joelinton stabbed 21st-minute pass with the home side finally starting to find a rhythm.
Mitov did well to turn away Murphy’s curling effort from Saint-Maximin’s intelligent pass, but fielded Joelinton’s header from a Ryan Fraser corner with some comfort.
The Magpies, playing for the first time in 12 days, were dominating possession, but wasting much of it with a series of aimless crosses which caused the visitors’ defence few problems.
However, Mitov did have to save from Saint-Maximin and Murphy in quick succession either side of a correctly-disallowed Schar strike.
In the meantime, last man Matt Ritchie had been given the benefit of the doubt by both referee Michael Salisbury and VAR official Peter Bankes after an untidy challenge on Harvey Knibbs.
Mitov then had to excel himself on the stroke of half-time to divert Murphy’s rasping drive on to the crossbar, and was grateful to see Joelinton steer Trippier’s corner straight into his waiting arms two minutes after the restart.
Murphy’s accomplished 51st-minute finish counted for nothing after an offside flag ruined his celebrations, and Trippier could not beat the defensive wall with a free-kick four minutes later as the Magpies’ frustration grew.
The mood inside St James’ Park took a turn for the worse when first Martin Dubravka and then Fabian Schar failed to deal with a ball into the box and Cambridge forward Ironside pounced to put the visitors ahead.
Newcastle’s response was concerted, but disjointed as extensive possession failed to yield meaningful opportunities, although Cambridge needed a superb Mitov save from Joelinton’s late header to seal an unlikely win.