A Heung Min Son hat-trick and goals from Stefan Kießling and Gonzalo Castro completed Bayer's tally, but a Maximilian Beister strike and a Pierre-Michel Lasogga brace kept Hamburg competitive until the last.
A goal was all Leverkusen had lacked in the UEFA Champions League in Ukraine in midweek and they seemed keen not to make the same mistake against HSV, launching a wave of early attacks. Sidney Sam missed two good chances before Son gave them a deserved lead.
The South Korean scored his first goal since the opening day of the season, and his first against his former club, receiving Castro's pass before beating Heiko Westermann and placing a low shot past Rene Adler. Son was then put through by another former Hamburg player, Sam, to double Leverkusen's advantage. He raced forward, took the ball round Adler and swept it in to grab the fifth brace of his career and his first for Leverkusen.
Flurry of goals
Beister led Hamburg's response, scoring from just inside the area after Simon Rolfes got caught in possession. Suddenly, Leverkusen found themselves defending as Hamburg started to take control of proceedings.
The visitors levelled early in the second half through Lasogga, but all that did was spark Leverkusen back into action. Son completed his first ever Bundesliga hat-trick, side-footing in after Sam had cleverly dummied Kießling's cross. The South Korean set up Kießling to make it four, but Lasogga's eighth in as many games set up a tense finale. The hosts held their nerve, however, and added a fifth late on when Castro lobbed Adler on the counterattack.
Line-ups and statistics
Check out five of the best from Heung Min Son on the Bundesliga's official YouTube channel: