The game's opening chance arrived after 14 minutes as James Rodriguez's corner found Jerome Boateng, who sent a header just wide of the upright.
Boateng then caused trouble for his side after bringing down Salomon Kalou, prompting the referee to award Herth a spot-kick on 23 minutes.
Vedad Ibisevic took responsibility and sent Manuel Neuer the wrong way to put the hosts in the lead with his fourth league goal of the season.
While Bayern failed to capatilise on their chances, the hosts made it 2-0 just before the break as Valentino Lazaro raced to the byline and cut the ball back for Ondrej Duda , who fired home close range.
After a frustrating start to the half, Bayern went close to reducing the deficit in the 68th minute through Boateng's header was kept out by Thomas Kraft.
Robert Lewandowski has endured a quiet start by his standards, and he could have pulled a goal back for the visitors with 11 minutes remaining but his header from six-yards out failed to find the target.
Despite the late push from the Bundesliga champions, Hertha managed to hold on for the victory and clean sheet.