Michael Mellon scored the Oldham winner on debut for his manager and dad Micky to sink Cambridge.
Mellon, on loan from Burnley, grabbed what proved to be the matchwinner in the 21st minute.
Luke Hannant played in Jamie Robson, who pulled the ball back for Mellon to stroke home.
Home side Cambridge were almost level a minute before the break when goalkeeper Mat Hudson flapped at Sullay Kaikai’s corner, but he was able to get up to block Kell Watts’ blast.
Nine minutes after the restart Louis Appéré led a fast break and then ran onto Kaikai’s return pass, only to be denied by a goal line clearance by Hannant.
Oldham boss Mellon was booked for complaints to officials before his side almost made the game, Jake Eastwood tipping over Tom Conlon’s freekick.
Eastwood saved as Kane Drummond broke away at the death.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.