From the kick-off Wednesday, Bayern dictated the pace on the pitch and brought about the first chance of the encounter. The hosts were soon rewarded 15 minutes into the match when Lahm headed home a Franck Ribery cross.
Barcelona almost responded through Sergi Roberto, who pulled the ball wide under pressure from Bayern goalkeeper Manuel Neuer.
It was an evenly balanced first half as both sides looked for offensive options. However, Thomas Mueller squandered two opportunities before Barcelona's Cristian Tello was unabale to convert just before the break.
With the beginning of the second half, the flow of the match declined as Barcelona made eleven substitutions in a row. Consequently, Bayern had the better of the play as Ribery, Thiago Alcantara and Mandzukic came close to doubling the lead.
Three minutes before the final whistle, Mandzukic scored the deserved second goal when he exploited a low cross by Diego Contento from very close range.
The German giants will take on league rivals Borussia Dortmund in the Supercup July 27.