Hakan Calhanoglu came close to scoring for the hosts in the opening minutes, but he could only fire his effort wide of the post.
Midway through the first half Markus Feulner had a great opportunity for Nuremberg when he picked the ball up on the edge of the box, before drilling a strike against the post.
Just before the break it was Hamburg who hit the woodwork, as Jacques Zoua prodded a strike from close range onto the post.
Calhanoglu gave the home team the lead with 10 minutes of the match left to play, as his strike from just outside the box took a deflection before looping over Raphael Schafer and into the net.
They scored a second six minutes later when Mike Frantz turned the ball into his own net while attempting to clear a cross from the left.
Josip Drmic pulled a goal back for Nuremberg in the last minute when his low strike beat Rene Adler at his near post, but there was not enough time for them to score again as Hamburger held on to claim the three points.