On the first day of the second-half of the German league season, following the six-week winter break, Bayern suffered their third defeat of the campaign so far, having been humbled by Werder Bremen and Hanover last year.
Petric's goal puts Hamburg a point clear at the top of the Bundesliga with previous leaders Hoffenheim in action on Saturday.
"That was the highlight of my time in charge of Hamburg," beamed former Tottenham Hotspurs coach Jol, who took over from fellow Dutchman Huub Stevens last summer. "It was an unbelievable game. We had five or six chances to score more goals and Bayern also had their chances to get on the scoresheet."
Hamburg were without banned Croatian striker Ivica Olic, who was sent off for fighting in a friendly with Hoffenheim earlier this month, while Bayern were buoyed by their 5-1 German Cup win over Stuttgart in midweek.
"The first half-hour was frustrating for me," said Bayern coach Jürgen Klinsmann, whose side drops to third. "We stood off the opposition too much and allowed Hamburg to play. We played OK in the second half, but we wasted too many chances. "It's a disappointing result and we have to pick up some points next week."
Hamburg made the brighter start when winger Piotr Trochowski hit the post after just six minutes having beaten Bayern goalkeeper Michael Rensing.
Munich looked to have taken the lead just after the half-hour mark when striker Luca Toni held off his marker and hit the back of the net, but a linesman's flag ruled the goal offside.
But the home side got the breakthrough they deserved on 44 minutes when Czech midfielder David Jarolim drove his shot in from 35 yards out. Rensing parried the attempt, but Mladen Petric pounced on the loose ball and headed past the stranded Bayern goalkeeper.
Bayern responded immediately, but a header from Toni was driven wide of the post and Hamburg were 1-0 up at half-time.
Both sides squandered chances to score in the second half, but the best chance fell to Toni when his forward partner Miroslav Klose set up a clear chance, but the Italian could not connect with the ball.
Then, with less than ten minutes to go, Hamburg goalkeeper Frank Rost and defender Jerome Boateng combined to deny Klose at point-blank range.