Germany's exit brought the third consecutive World Cup in which the defending champions have gone out at the group stages, with Spain and Italy facing the same fate in 2014 and 2010 respectively. They won one game and drew two in both 1958 and 1978, while in 1986, they went on to play the final despite winning, drawing and losing one game apiece in Mexico.
Nervous Germany increased the pressure after the break and poured forward but despite a one-sided second half it could not find the back of the net before South Korea's last-gasp double.
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.
South Korea kept Germany from advancing to the group of 16 with a pair of fantastic goals in stoppage time.
South Korea took a 93rd minute lead when Kim found the roof of the net from two yards out.
The World Cup will have a new champion this year.
Spirited Saudi Arabia overcome Salah strike for World Cup win
Earlier, Mohamed Salah found the back of the net in the 22nd minute to hand Egypt an early lead in the game. The Second half saw the Saudi Arabians dominating the all Arab affair.
Kim Young-gwon's 92nd-minute goal, awarded after a video assistant referee decision, left four-time winners Germany on the brink of elimination.
"I have to say that we qualified because we beat Germany and Korea, but nevertheless I am very hurt", coach Juan Carlos Osorio said.
After the match was whistled over, German players looked to be in disbelief; many simply stood or sat on the turf and looked off into the distant horizon - one that which, astoundingly, no longer includes Die Mannschaft reaching the knockout round of the World Cup.
Germany's best chance before going behind had fallen to Mats Hummels late on, but the defender wasted it, paving the way for South Korea's late show. After a VAR review for offside, the goal stood.
"At this tournament we didn't deserve to win again or move to the round of 16. We need to congratulate our opponents", an apologetic Loew said.
South Korea, for its part, needed a miracle to qualify for the next round; in the end, although neither side qualified, it was a match that will be remembered for years to come in the Asian nation.