Mueller, who scored five goals at the 2010 World Cup, dominated against a weak Portugal team that was clearly outplayed.
With chancellor Angela Merkel in the stands, the German team celebrated its 100th World Cup match with a rousing victory that virtually assured by halftime.
Mueller scored either side of Mats Hummels' headed goal as Germany took a 3-0 lead by halftime, and added his third goal in the 81st.
Portugal was already 2-0 down before Pepe was red carded in the 37th minute for apparently head-butting Mueller when the German player was sitting on the ground.
It was Mueller who opened the scoring in the 12th minute after Mario Goetze had been pulled down by Joao Pereira in the box, coolly slotting the penalty kick into the right corner of Rui Patricio's goal.
Hummels had risen above Pepe to double Germany's lead with a well-timed header from a corner in the 32nd, and Mueller extended the buffer just before the break when he stripped the ball from Bruno Alves and drilled in a low shot.
The Bayern Munich forward completed the rout late in the second half, poking in from close range after Patricio had fumbled a low cross from substitute Andre Schuerrle.
Cristiano Ronaldo started for Portugal at Arena Fonte Nova after overcoming a knee injury. He threatened early in the match, including a shot from a break that Germany goalkeeper Manuel Neuer could only block, but there was nobody from Portugal to pounce on the rebound.
Portugal also lost big striker Hugo Almeida to an injury. He was replaced by Eder in the 28th.
Fabio Coentrao injured a groin muscle and was helped off the field in 65th, to be replaced by Andre Almeida.
Hummels then limped off the field with a right-knee injury, giving substitute defender Shkodran Mustafi his second cap.
In the second Group D match later Monday, the United States plays Ghana at Natal.
More Sports Headlines
Seahawks do what rest of salary-capped NFL say teams can't do Mariners beat Twins 4-3 in 11 innings Snohomish mixed martial artist returns to her first love AquaSox strand 10, fall 3-2 to Volcanoes Seahawks release DT McDaniel , acquire CB Seisay Benches empty as Royals fall to Blue Jays Rays demote Moore, place Souza on DL with fractured hand Charles scores 29 points, Liberty beat Storm 78-62
Our new comment system is not supported in IE 7. Please upgrade your browser here.