Jacques Zoua had the first chance of the game inside five minutes, but the Hamburg striker could not beat the goalkeeper with his close-range header.
Hamburg, looking for a way back in, had a half-chance through a Tolgay Arslan strike, but his shot from outside the box went wide.
Anthony Modeste then had a good chance to double his side's advantage, but only managed to pick out Rene Adler.
The equaliser seemed to spur on the visitors as they dominated the second half. They were ahead again inside five minutes when Kevin Volland finished low.
As Hamburg came forward, Hoffenheim made it three on the break with Firmino crossing for Modeste to finish from close range.
The Frenchman added his second with the same combination on 74 and three minutes later Firmino scored his own from the edge of the box to complete the rout.