Thapelo Maseko netted the decisive goal in the 63rd minute, sweeping home at the near post after being set up by substitute Tshepang Moremi.
The result means Bafana Bafana end their group-stage campaign in second place with four points, behind Group A winners Mexico (nine points), who defeated bottom side Czechia 3-0 in their final first-round encounter.
South Korea end their campaign in third and will need to wait to see if their three points are enough to see them progress as one of eight best third-placed teams.
Both sides made three changes from their previous match, with Evidence Makgopa, Relebohile Mofokeng and Yaya Sithole all included in the starting line-up for Bafana – with Sithole returned after serving a one-match suspension.
Korea started on the front foot with an early corner that needed to be cleared off the line by Aubrey Modiba after Kim Min-jae rose highest to head on target.
Mofokeng was briefly in on goal from an early long ball, but Korea goalkeeper Kim Seung-gyu was quickly off his line to collect.
Mofokeng then had a shot deflected wide following a dangerous Oswin Appollis corner.
Lee Ki-je appealed for a corner of his own after his shot flew just past Ronwen Williams’ left-hand upright following a good attacking move from the Koreans.
Soon after, Mofokeng looked to tee up Makgopa with a teasing ball into the box on 10 minutes, but his effort was scooped up by Kim Seung-gyu.
Makgopa was wide with a 15th-minute header from just outside the Korea box after a good curling cross from the left by Modiba.
Lee Gi-hyuk made a crucial block to deny a lively Maseko a clear shot at goal after a superb ball from Mofokeng had released the winger. Kim Seung-gyu was then relieved when Appollis fired straight at him as Bafana threatened from the resulting corner.
Bafana’s best chance of the half arrived on the half-hour mark after a driving run from Maseko created a shooting opportunity for Thalente Mbatha. Kim Seung-gyu spilled the effort into the path of Makgopa, but the striker could not beat the goalkeeper from close range, although replays suggested he was in an offside position.
A more positive Bafana approach than the one displayed in their first two World Cup matches was paying dividends and South Africa were nearly in again on 32 minutes after a neat give-and-go between Mbatha and Appollis. However, the Orlando Pirates attacker was ultimately bundled off the ball as he looked to get his shot away.
Maseko then fired over from just outside the Korea penalty area after being released by a superb through ball with five first-half minutes remaining, and Mofokeng got his angles wrong as he looked to curl home from the left-hand side after being teed up following another Appollis corner.
South Africa were certainly enjoying possession and another slick passing move resulted in a chance on goal, but Maseko was crowded out as he looked to get his shot away.
Hugo Broos’ side ended the first half as the stronger of the two teams, with a Maseko corner requiring a defensive clearance.
Korea responded at the start of the second half with three changes. Son Heung-min came on for Hwang Hee-chan, Lee Tae-seok made way for Jens Castrop and Kim Jin-kyu replaced Paik Seung-ho.
Son had a good opportunity on the edge of the Bafana box just three minutes into the second half, but he opted to pass and the chance was lost.
Bafana, meanwhile, had a golden opportunity to take the lead in the 51st minute after a neat touch from Mofokeng to set up Maseko, but Castrop made an excellent covering tackle.
Castrop was played in by Son on 55 minutes, but his cross across the face of goal failed to find a teammate.
Williams needed to dive to his right to stop Oh Hyeon-gyu from finding the back of the net from a close-range header on the hour mark.
While, with time running out for Bafana to secure their place in the knockout rounds, Broos introduced Tshepang Moremi for Appollis — and with his first meaningful involvement, the substitute created the opening goal.
Maseko swept home from the edge of the Korea box after being expertly teed up by Moremi’s square pass, leaving Kim Seung-gyu with no chance.
Korea replaced Kim Min-jae with Park Jin-seob as they searched for a response. Cho Gue-sung then came on for Oh Hyeon-gyu, while Bafana introduced Iqraam Rayners for goalscorer Maseko.
There was a noticeable increase in tempo from the Koreans as they searched for an equaliser to keep their World Cup dreams alive.
There was still time for another South Africa change as Mofokeng made way for Jayden Adams with 10 minutes remaining.
South Korea were seeing plenty of the ball and a dangerous Castrop cross needed clearing by Modiba, while an 85th-minute corner was punched clear by an advancing Williams.
Seol Young-woo fired well over the Bafana crossbar after the ball broke kindly for him following another Korea corner. Son then had a shot deflected wide by the excellent Ime Okon, who, alongside centre-back partner Mbekezeli Mbokazi, was outstanding in defence for South Africa.
There was a nervy moment for Williams in stoppage time when Castrop lifted a clever ball towards the near post where Park was waiting, but he could not generate enough power on his backward header and the Bafana captain gratefully collected.
South Africa ultimately held on to their narrow lead to claim a famous victory and book their place in the Round of 32, where they will face Group B runners-up Canada.