India scored both their goals from field efforts through skipper Harjeet Singh (11th minute) and Mandeep Singh (55th), while Kyle Lion-Cachet (28th) found the net for the Africans.
India, thus, finished the pool engagements with possible nine points from three wins and will now face second placed team in Pool C, Spain in the quarterfinals on Thursday.
It was a one-way traffic initially as India went all out attacking that forced South Africa to fall back and defend.
The Indians attacked in numbers from the word go but they seemed to fizzle out once inside the opposition circle.
More From This Section
India finally tasted success in the 11th minute when skipper Harjeet scored with a slap shot after being set up by Manpreet (Jr's) hardwork from the left flank.
Pepped up by the goal, India stepped up the pressure and managed to secure their first penalty corner six minutes later but Harmanpreet Singh's effort was saved by South African goalkeeper Siyavuya Nolutshungu.
Minutes later, Gurjant Singh came tantalisingly close to restoring India's lead but his reverse hit from close range went just wide. With a minute remaining for half time, India secured a second penalty corner but this time Harjeet fumbled to stop the push and the two teams went into the break locked at one-goal apiece.
The Indians continued in the same vein after the change of ends and had another shot at the South Africa goal in the 45th minute. Gujrant set it up for Nilkanta Sharma whose shot from inside the circle was brilliant parried away by the South African custodian.
Desperate for a win in front of a cheering home crowd, India restored their lead in the 55th minute through a brilliant strike from Mandeep.
Mandeep pounced on Harjeet's diagonal pass from outside the circle and then unleashed a fierce reverse hit to beat the South African goalkeeper all ends up.
Three minutes before the final hooter, South Africa got a golden opportunity to draw level when India conceded a penalty corner but the effort went wide. The loss shattered South Africa's hopes as they needed a win to stay alive.