Guardiola’s men, who charged past Porto 7-4 on aggregate in the quarter-finals, will travel to Catalonia first before hosting the La Liga giants in Bavaria a week later.
The other last-four tie sees Serie A side Juventus, who edged out Monaco, take on Real Madrid, who in turn knocked out city rivals Atletico in the last eight.
Champions League semi-final draw:
Barcelona v Bayern Munich
Juventus v Real Madrid
Ties to be played may 5/6 and May 12/13.