Rafael van der Vaart was presented with the first opening of the game after four minutes, but his strike was closed down by the opposition defence.
Artjoms Rudnevs came close again for the away side on 13 minutes, but he couldn't get his header on target.
Stuttgart almost took the lead three minutes later, but Raphael Holzhauser's effort struck the bar and bounced clear.
Van der Vaart's shot on 36 minutes was struck well, but the goalkeeper stood firm and kept it out.
Martin Harnik had an attempt for the home side just before half time; however, he couldn't find the finish to give his side the lead at the break.
Serdar Tasci had the first effort of the second half, but his powerful header on 47 minutes was cleared.
Hamburg then took the lead on 50 minutes when Rudnevs finished well from a Dennis Diekmeier pass.
Vedad Ibisevic broke free for Stuttgart, but his shot went just wide of the post.
Stuttgart pushed for an equalise, though it was Hamburg who almost doubled their lead on 79 minutes, but Tomas Rincon could only hit his strike wide.
Son Heung-Min came close on 89 minutes, but the Stuttgart defence blocked well.