They could also have gone through with a draw, if the Sweden-Mexico game had also ended in a draw.
Four minutes later German goalkeeper Manuel Neuer was tackled as he roamed deep into South Korea's half, with a long ball giving Son Heung-Min the chance to slot home into an empty net from close range.
Although Korea have lost each of their two Group F games so far, they could still get through to the last 16 if they beat Germany by two goals and Sweden lose to Mexico.
All four teams in the group had a chance to advance in games that were being played simultaneously, but Sweden's 3-0 lead over Mexico put Germany in prime position to move on as well - if the Germans could score against the South Koreans.
It is the first time since 1938 that a Germany or West Germany side has not advanced beyond the first section of the tournament, as Joachim Low's side - top of Fifa's world rankings - finish bottom of Group F.
Germany, champions of the 2014 World Cup, have been eliminated from the 2018 edition after a phenomenally brutal loss to South Korea.
"The disappointment of being eliminated is just huge, but we need to congratulate Mexico and Sweden who have made it out of the group".
Michael Ballack surprised by timing of Joachim Low contract
It all started with a poor showing against Mexico in the Germans' first match of the World Cup , where they were beaten 1-0. But the hosts have shown they are no pushovers, particularly in Moscow, where they play Spain next.
Priyanka Chopra says Nick Jonas is her ‘favourite man’
The "Chains" singer was Priyanka's date for the Ambani engagement party. "My favourite men", Priyanka captioned the photograph. The couple made a decision to get married in March and a grand party was hosted by the Ambanis on the occasion.
575 arrested in women's protest against immigration policy at Senate building
The protest, which included 100 demonstrators and possibly just as many police, took place in the Hart Senate Office Building. Among those arrested in the senate building were Pramila Jayapal , a Democratic member of Congress representing Seattle.
The win also kept South Korea from joining the list of Asian Football Confederation (AFC) members without a victory.
The goal was initially ruled out for offside, but the decision was overturned following a video review.
In fact, only Brazil of the past five winners have managed to extend their defence of the title past the group stage with 1998 winners France falling at the first hurdle in 2002.
Leaving aside Uruguay - who won the inaugural World Cup in 1930 before not travelling to Italy for the 1934 edition - it is the sixth time in the history of the competition that the reigning champions have failed to make it past the first hurdle. The team's bad luck in Russian Federation continued Wednesday, as Mats Hummels was unable to put away a free header from 6 yards out late in the match.
"We beat the world champions and normally it's a dream and we can be proud of the team", Son said.
In case you missed last night's developments at the FIFA World Cup in Russian Federation, a lot happened.
South Korea, however, finished its campaign in Russian on a high, scoring two goals in injury time. Mexico next faces the victor of Group E and, Alcocer concedes, "We have to more careful about everything".