Also, Hertha Berlin reached the semifinals for the first time in 35 years by winning at Heidenheim 3-2. Hertha was drawn at home against Borussia Dortmund for a place in the final in its home stadium.
Second-division Bochum, playing at home, made an encouraging start against Bayern with the first big chances falling to Simon Terodde within three minutes of each other early on.
Bayern enjoyed most of the possession but struggled to create any real opportunities until Thomas Mueller set up Robert Lewandowski to score in off the left post in the 39th.
Bochum was dealt another blow four minutes later when Jan Simunek was sent off for bringing down Arjen Robben as the last defender. But Manuel Riemann saved the resultant penalty, taken poorly by Mueller.
Opinions varied on whether the penalty was fair or not.
"He dived. There's contact there, he touched his foot, but it's football, it's a contact sport. He dived," Bochum coach Gertjan Verbeek said.
Riemann said, "Robben spent 90 minutes on the ground. He doesn't need to do it, he's world-class," while Robben said it was "a clear penalty and red card."
Thiago Alcantara got the goal the visitors threatened since the interval, again set up by Mueller, after a cool flick over a defender from Robben.
Mueller missed another great chance three minutes later, and Robben set up Douglas Costa to shoot over as Bayern failed to make the most of its superiority.
Lewandowski rounded off the scoring in the final minute with a cool finish after Robben played him through.
"It's always dangerous in the cup as long as it's scoreless. We controlled the second half. It wasn't easy out there but we're happy, we're in the semifinals," Lewandowski said of Bayern's 27th semifinal appearance.
Earlier, Arne Feick got second-division side Heidenheim off to a flying start agaist Hertha when he converted at the near post from a corner.
But Vedad Ibisevic was left unmarked at the far post to equalize four minutes later, and he put Hertha ahead seven minutes after that with a fine finish to Mitchell Weiser's cross.
Midfielder Genki Haraguchi sealed the result in the 58th when he left three Heidenheim defenders standing before scoring with his right boot.
Marc Schnatterer's late penalty proved to be just a consolation for the hosts.
Hertha said Salomon Kalou suffered a suspected muscle fiber tear in his right thigh.
Dortmund and Bremen won their quarterfinals 3-1 at Stuttgart and Bayer Leverkusen, respectively, on Tuesday.