Although Barcelona left new Brazil signing Neymar at home, first-team regulars Javier Mascherano, Adriano, Alex Song and Alexis Sanchez, plus Argentina's Lionel Messi played the first-half in Munich.
Goals by Philipp Lahm and Mario Mandzukic either side of half-time was enough to give the Champions League winners victory over the Catalan giants at a sold-out Allianz Arena in front of 71,137 fans.
With the Uli Hoeness Cup on offer, in honour of Bayern's president, this was Munich's second pre-season title in four days having won Sunday's Telekom Cup final with a 5-1 win at hosts Borussia Moenchengladbach.
Barcelona had something to prove on their first return to Munich since their 4-0 drubbing in April's Champions League semi-final, which the Germans had backed up with a 3-0 win in Spain.
But with Gerardo Martino back in Spain, ahead of Friday's official unveiling as Barcelona new manager, caretaker coach Jordi Roura had no qualms about blooding his entire bench of juniors at half-time.
Likewise, with the Bundesliga season a fortnight away, Guardiola gave both Brazil centre-back Dante and Germany's Bastian Schweinsteiger, back from a minor ankle op, their first pre-season appearances.
Messi made a bright start with a run through midfield before blasting his shot wide, while at the other end, Germany's Toni Kroos forced Barcelona goalkeeper Jose Manuel Pinto into a diving save.
France winger Franck Ribery and Holland's Arjen Robben then combined and only the desperate boot of Barcelona's Adriano deflected the Dutchman's shot in a lively first five minutes.
Bayern took the lead on 13 minutes when captain Philipp Lahm latched onto Ribery's chipped cross and lobbed his header over Pinto.
At the other end, Bayern's Germany goalkeeper Manuel Neuer denied Barca's Sergio Roberto with the ball at his feet and pushed the shot wide.
Germany's Thomas Mueller, playing as Bayern's lone striker, was only denied again by Adriano's desperate intervention as Bayern pressed for a second with half-time approaching.
The half-time break heralded a host of changes, including the full Barcelona team, while goal-scorer Mandzukic would become one of 10 second-half introductions.
Bayern grabbed their second on 87 minutes when squad member Diego Contento whipped in a cross which Croatia's Mandzukic buried from close range.
Bayern now travel to face Borussia Dortmund on Saturday in the German Super Cup in a repeat of the Champions League final, which the Bavarians won 2-1 at Wembley in May.