Bayern hit second division Ingolstadt for six
Bayern forward Nils Petersen, replacing Mario Gomez, scored twice as coach Jupp Heynckes fielded a largely second string team following Sunday's league defeat by Hannover 96.
Thomas Muller's deflected shot gave Bundesliga leaders Bayern a 33rd-minute lead and David Alaba added a second with a powerful drive from 15 metres.
After Petersen's double Marvin Matip added an own goal, deflecting in Brazilian defender Rafinha's close-range effort, before Japanese Takashi Usami hit Bayern's sixth goal in the final minute in front of 63,000 fans.
"After a rough start we started enjoying ourselves after going 3-0 up," Heynckes told reporters.
Dutch striker Klaas-Jan Huntelaar, who has scored eight goals in 10 league games this season, headed Schalke into the lead with his fifth German Cup goal of the season nine minutes from time and Joel Matip added another two minutes later.
Earlier, Delron Buckley almost gave second division Karlsruhe the lead when his first half free-kick rattled the crossbar.
Hertha Berlin had to wait for more than an hour to achieve the breakthrough against Rot-Weiss Essen but finally ran out 3-0 winners against the fourth division side.
Colombian Adrian Ramos headed the opener on 64 minutes and gifted 19-year-old Pierre-Michel Lasogga made it 2-0 eight minutes later after a mistake by keeper Dennis Lamczyk.
Nikita Rukavytsya's goal four minutes from time made sure Hertha reached the third round for the first time since 2006.
Mainz 05 goalkeeper Christian Wetklo saved a penalty by Didier Ya Konan with the last kick of extra-time to give his team a 1-0 win at Hannover 96.
Austrian Andreas Ivanschitz had put the visitors ahead on 93 minutes.
There was also last-minute drama in Frankfurt with Kaiserslautern snatching a 1-0 extra-time victory over second division Eintracht Frankfurt, Richard Sukuta-Pasu scoring in the 119th minute.
Fourth division Holstein Kiel also advanced with a 2-0 win over second-tier MSV Duisburg while VfB Stuttgart beat second division FSV Frankfurt 3-0.