Germany top the group and will face the runners-up in Group H, while the USA finish second and will face the Group H winner. Portugal beat Ghana 2-1 and were eliminated along with the Africans.
The Germans dominated the game as Juergen Klinsmann's USA team, with their backs against the wall, creating very few chances.
The breakthrough came after 55 minutes when Tim Howard parried out a Per Mertesacker header but Mueller collected the loose ball on the edge of the area and side-footed it in to the bottom corner.
"For once I scored a beautiful goal. If I don't watch out I'll become a legend? OK, I won't watch out," Mueller said after being told he had bettered Diego Maradona's World Cup goal tally of eight. "We are ready for the knockout stage. We keep working hard and we are full of team spirit."
The game had been threatened by a morning downpour in the north- eastern city of Recife but the heavy rain that hampered the preparations of fans and players alike eased to a drizzle as kick-off approached.
Despite both sides only needing a draw to qualify there was no shortage of attacking intent in the lively opening exchanges, with Mueller going close from Lukas Podolski's low cross.
Both sides also tackled strongly in the battle for supremacy in midfield, and Klinsmann and his German counterpart Joachim Loew might have been fortunate the referee did not book more players as they head for the knockout stages.
Content to concede possession for long periods, the Americans put in a blue-collar defensive performance, breaking forward when the opportunity arose, but with their superior technique and ball movement the Germans were always a threat.
The Americans had several chances but lacked the pace and guile to trouble German goalkeeper Manuel Neuer.
"Everyone said we had no chance, but we took the chance and we move on and now we really want to prove a point," Klinsmann said. "The commitment was great. I wish we had more possession and created more chances but maybe we are saving that for the next one. It is a huge, huge step and we can't wait for the round of 16."