With the win, Germany moves into a tie with Slovakia for second place in Group C of the Worlds, which are being held in Canada for the first time in the 100-year history of the International Ice Hockey Federation.
Marco Sturm and Stefan Ustorf also scored for Germany, who were outshot 38-35 by the Slovaks.
"We played a really good game," Boston Bruins forward Sturm said. "We tried to out-battle them and it worked. We were the better team today."
Germany has had little success in recent years against Slovakia, who were without some of their top guns in this event. Marian Goborik, Pavol Demitra and Zdeno Chara are either hurt or skipping his event.
"This is huge. Slovakia is one of bigger teams in the world," Sturm said. "We know they don't have their big stars in the lineup but we don't care. We take every win and it is nice to have it."
Ivan Ciernik and Juraj Kolnik scored for Slovakia, who won the World title in 2002. Slovakia beat Germany 5-1 at the 2007 Worlds and 3-1 in 2003. But they couldn't solve Muller on Monday and they gave up three power-play goals to Germany.
"It is nice to have those power-play goals," Sturm said. "Special teams is such a big part of hockey right now."
Müller, who plays for Kölner Haie, had to be sharp in the third period, making a point-blank save on Peter Fabus and then denying Andrej Podkonicky on a breakaway in the final minute.
"He was unbelievable today," Sturm said of Müller. "He kept us in the game all night long. He deserved to be the best player tonight."