Paul Mullin scored both goals as the Shrimps took the points despite facing heavy pressure throughout.
He gave his side the lead after 16 minutes, nodding in from close range after Kevin Ellison's fine cross from the left evaded everyone.
Cambridge pressure paid off 10 minutes after the break when Tom Elliott powered a header past Barry Roche via the crossbar after a cross from the right spun into his path off a defender, but they were only on terms for five minutes.
Mullin restored the lead with another simple finish after Andrew Wright squared the ball into his path.
The hosts racked up the chances, Roche denying Kwesi Appiah twice in the first period and excelling himself to prevent Luke Chadwick and Josh Coulson from equalising after half-time, while Elliott twice headed off target when well placed in a frenetic second period which saw Morecambe hang on.