David Bridges' winner saw Cambridge beat promotion favourites Hereford in the U's first game at the Abbey Stadium following their relegation.
Midfielder Stephen Smith volleyed Cambridge ahead from the edge of the box on the stroke of half-time.
Hereford's pressure told when Guy Ipoua headed Alex Jeannin's corner in off the post from close range.
Bridges netted the winner 20 minutes from time, rifling a volley through Hereford keeper Craig Mawson's legs.
Cambridge Utd: Behcet, Gleeson, Peters, Duncan, Chick, Smith, Bridges, Quinton, Angel (Okai 78), Turner, Onibuje (Duffy 83).
Subs Not Used: Daniels, Nolan, Robbins.
Booked: Chick, Duffy, Peters.
Goals: Smith 44, Bridges 70.
Hereford: Mawson, Green, Mkandawire, James, Beckwith, Jeannin, Coldicott (Carey-Bertram 82), Brady, Ferrell (Purdie 57), Stansfield, Ipoua.
Subs Not Used: Brown, Stanley, Blewitt.
Booked: Jeannin, Beckwith.
Goals: Ipoua 62.
Ref: S Proctor-Green (Lincolnshire).