The Poland international's treble, coupled with goals from Arturo Vidal, David Alaba, Kingsley Coman and Arjen Robben, gave the champions a seventh emphatic win in a row over Hamburg at the Allianz Arena and maintained the gap over second-place RB Leipzig.
The victory was a particularly special one for head coach Carlo Ancelotti, who celebrated his 1,000th game as a head coach with his 591st win.
Vidal's powerful strike put Bayern ahead before Lewandowski struck twice before half-time, and any hope of a shock comeback from Markus Gisdol's side was ended when he completed his treble nine minutes after the break.
Alaba added a simple fifth, Coman struck twice within 10 minutes of coming off the bench and Robben fired home in the closing stages, taking a ruthless Bayern's tally to 44 goals in their last seven home games against HSV, who remain third-from-bottom of the Bundesliga table.
Vidal received a ticking-off from the referee after conceding four free-kicks in the opening stages, but the Chile international made a much more productive contribution with only 16 minutes played.
Alaba found Thomas Muller on the edge of the area, who turned the ball into the path of Vidal, and the midfielder blasted in a low strike that Rene Adler could only parry into the bottom corner.
Adler - making his 250th Bundesliga appearance - made a brilliant point-blank stop to turn a Lewandowski strike onto the crossbar, but the Poland striker could not be stopped from scoring the second on 24 minutes.
Muller was brought down by Mergim Mavraj's clumsy challenge as he tried to reach Philipp Lahm's cross, allowing Lewandowski to send Adler the wrong way from the resulting penalty.
Hamburg began to regain some composure but the game was put beyond their reach three minutes before the break, as Lewandowski controlled the ball before firing high into the net from 12 yards out after Adler had saved well from Douglas Costa.
Michael Gregoritsch's free-kick just after half-time brought the first save from Manuel Neuer, but Adler was called into another spectacular one-handed stop to deny Robben from close range following a swift Bayern break.
But Hamburg gifted Bayern their fourth - and Lewandowski his hat-trick - on 54 minutes. Gotoku Sakai's failed clearance allowed Robben to backheel the ball into Lewandowski's path, and the striker picked out the bottom-right corner from the edge of the area with an unerring side-footed finish.
Two minutes later and Bayern had their fifth, Muller unselfishly squaring the ball to Alaba to tap home from six yards after springing the offside trap and beating Adler to the ball.
Lewandowski and Thiago were taken off, with Ancelotti casting one eye towards next week's DFB-Pokal clash with Schalke, and substitute Coman got on the scoresheet when he raced into the area and prodded the ball beneath Adler following a poor attempted interception from Johan Djourou.
Coman got a second four minutes later, firing an expert half-volley past the static Adler, and there was enough time for Robben to ensure that Bayern matched their victory of two seasons ago, the Dutchman racing down the right, cutting onto his left foot and placing the ball into the bottom corner in typically stylish fashion.