The German record champions took the reins from the starting whistle and came to chances through Kingsley Coman and Jamal Musiala in the opening stages.
Bayern’s lively start paid off as the visitors broke the deadlock in the 17th minute when new arrival Joao Cancelo whipped the ball to the far post and Maxim Eric Choupo-Moting tapped home left-footed from a tight angle, reports news agency Xinhua.
Mainz posed no threat in front of the target, while Bayern kept it going as Musiala made it two with a well-placed low shot at the half-hour mark.
Bayern wasn’t done with the scoring in the first half and tripled its lead with two minutes remaining when Choupo-Moting flicked on to Leroy Sane, who made no mistake from close range in the 43rd minute.
Mainz eventually sparked to life after the restart, as Anthony Caci’s curling shot forced Bayern goalkeeper Yann Sommer into action for the first time one hour into the clash.
Julian Nagelsmann’s men made it 4-0 in the 83rd minute after Joshua Kimmich’s chipped ball into the area allowed Alphonso Davies to head home from the central position.
Bayern Munich returned to winning ways after snatching its first win in 2023.
“Mainz is a stubborn opponent and can make your life difficult. I think they were surprised at how offensively minded we played in the first half. Mainz increased the pressure in the second half, but we never handed over our control,” commented Nagelsmann.
“Bayern obviously staged a ruthless first half, but if we had played in the first half as we did in the second, we would have been able to confront Bayern,” said Mainz sporting director Martin Schmidt.
Elsewhere, Leipzig booked their berth in the quarterfinals after moving 3-1 past Hoffenheim.