German international Thomas Mueller scored twice in four minutes midway through the second half.
Mehdi Benatia and Robert Lewandowski netted too while newcomer Douglas Costa, who also set up a goal, grabbed the fifth in the 87th minute.
Bayern, odds-on favourites to retain their league crown, were never threatened by the visitors who needed a relegation playoff to stay up last season and started the new campaign with a shock German Cup first-round defeat by fourth tier Carl Zeiss Jena last week.
“In the first half we had trouble with Hamburg defending with many players, six at the back, but we attacked much better in the second,” Bayern coach Pep Guardiola told reporters.
Despite having Mario Goetze on the bench amid widespread media speculation about his future at the club, winger Franck Ribery still injured and Bastian Schweinsteiger having left for Manchester United, the Bavarians turned on the style.
Brazilian Costa terrorised the Hamburg defence down the left wing with his speed while Chile international Arturo Vidal, who joined from Juventus in the close season, coolly orchestrated the attacks from midfield.
Hamburg, who had conceded a staggering 31 goals in their five previous visits to the Allianz Arena, were forced to defend from the start.
Poland striker Lewandowski twice went close before central defender Benatia headed in a Xabi Alonso free kick in the 27th minute.
Lewandowski made it 2-0 in the 53rd minute when Matthias Ostrzolek’s header rolled into his path and Mueller headed the third goal following a surging Costa run and a superb left-footed cross.
Mueller added his second goal of the evening in the 73rd minute, rounding keeper Rene Adler after good work from Lewandowski.
Costa then capped a memorable Bundesliga debut with a goal when he drilled the ball in from the edge of the box three minutes from time.
“It was a fully deserved Bayern win but we kept space tight at the start,” said Hamburg coach Bruno Labbadia.
“We need to defend much better though. At 2-0 we were too sloppy but it is a learning process even if it hurts.”
(Reporting by Karolos Grohmann, editing by Tony Jimenez)