"Obviously it's a huge achievement by our team to come through that group and qualify for the knockout stage," U.S. coach Jurgen Klinsmann said.
The Germans, three-time World Cup champions, finished with seven points, while the U.S. had four after allowing a 95th-minute goal against Portugal on Sunday in a 2-2 draw. Portugal also had four, but the Americans advanced from the so-called "Group of Death" because their goal difference was even and the Portuguese were minus three.
The Americans will play the Group H winner, likely Belgium put possibly Algeria, Tuesday in Salvador.
Read MoreWhy it pays to watch the game at work
"Once the group is done, another tournament starts," Klinsmann said. "Whoever it is, we'll be prepared."
The Americans sprinted out onto the field at the final whistle, about 30 seconds before the other game ended and made advancement official. Brad Davis raised both hands and led the applauding U.S. team to the side of the stadium where the majority of American supporters sat.
Just reaching Arena Pernambuco was an accomplishment. A tropical downpour flooded roads in a beach city known as the Brazilian Venice, and the U.S. bus had to make its way through ankle-to-thigh-high water that slowed traffic and left some cars stalled. Rain fell throughout much of the game, and there were scattered empty red seats.
Read MoreWorld Cup bite turns marketing bonanza
The game marked meetings of several former international teammates facing each other, an unusual occurrence. American right back Fabian Johnson started for Germany in the 2009 European Under-21 Championship alongside three of Germany's starters Thursday: Mats Hummels, Jerome Boateng and goalkeeper Manuel Neuer.
Klinsmann starred for West Germany when it won the 1990 World Cup and coached his homeland to the 2006 World Cup semifinals. His top assistant that year was Joachim Loew, who succeeded him as Germany's coach after the tournament. The two exchange a hug after the final whistle.
There had been fears before the match that the U.S. and Germany would not attack each other too much and be satisfied with a draw, which would advance both nations. Germany dominated possession with 60 percent and the Americans didn't threaten until second-half injury time.