Argentina's defeat of Greece meant that whoever won in Durban would go through with Diego Maradona's men into the knockout stages.
And Nigeria were left ruing what might have been when first Yakubu and then substitute Obafemi Martins failed to convert simple second-half chances.
Everton forward Yakubu's miss was right in front of a completely open goal and is sure to be replayed on televisions across the globe.
Nigeria had kicked off knowing only victory would give them a chance of avoiding joining Cameroon and South Africa on the list of early casualties.
And when Kalu Uche gave them a 12th-minute lead it looked like Lars Lagerback's side, who had lost their two other games, might indeed survive.
Right-back Chidi Odiah was the creator by beating two men down the right flank and when Cha Doo-ri failed to deal with the cross Uche nipped in to score.
The lead did not last until half-time however as poor marking from a free-kick allowed Lee Jung-soo to equalise.
The defender also required a fair portion of fortune however as his header took a deflection off his leg to beat goalkeeper Vincent Enyeama.
Enyeama was perhaps at fault four minutes into the second period when Monaco forward Park Chu-young deceived him straight from a free-kick to put Korea ahead.
At this point Greece were still holding out against Argentina and when Yakubu mis-kicked the ball wide from three yards after Yussuf Ayila had set him up in front of an open goal it seemed as though Nigeria would have to accept their fate.
But when substitute Kim Nam-il brought down Chinedu Obasi for a penalty that Yakubu redeemed himself by converting, news that Argentina had at last taken the lead meant Nigeria required just one more goal to stay in the competition.
And former Newcastle striker Martins, who now plays in Germany for Wolfsburg, knows he should have netted it.
The substitute had only goalkeeper Jung Sung-ryong to beat but although his chipped effort did just that it fell tamely the wrong side of the post.
Fellow replacement Victor Obinna twice came close late on but Korea held on to reach the last 16 for the second time in their history, and for the first outside their homeland.
They will now play Group A winners Uruguay in Port Elizabeth on June 26.
Nigeria (4-4-1-1): Enyeama; Odiah, Shittu, Yobo (Echiejile 46), Afolabi; Uche, Etuhu, Ayila , Obasi; Kanu (Martins 57); Yakubu (Obinna 70). Subs (not used): Ejide, Aiyenugbu, Taiwo, Brown, Haruna, Adeleye, Utaka, Odemwingie.
South Korea (4-5-1): Jung Sung-ryong; Cha Doo-ri, Cho Yong-hyung, Lee Jung-soo, Lee Young-pyo; Kim Jung-woo, Ki Sung-yong (Kim Jae-Sung 87), Park Ji-sung, Lee Chung-yong, Yeom Ki-hun (Kim Nam-Il 64,); Park Chu-young. Subs (not used): Lee Woon-Jae, Kim Young-Kwang, Oh Beom Seok, Hyung-ll Kim, Kim Dong-Jin, Kang Min-Soo, Kim Bo-Kyung, Ahn Jung-Hwan, Lee Seung-Youl, Lee Dong-Gook