The win boosted South Africa to 1-1-1 in Group A play but, combined with Tuesday's other group result in which Uruguay defeated Mexico 1-0, wasn't enough to push South Africa into the knockout round.
Uruguay (2-0-1) finished first in Group A. Mexico was 1-1-1 but had a better goal differential than South Africa and so was advanced. France, a pre-tournament favorite that saw much controversy after early on-field disappointments, was sent home with a 0-2-1 mark.
Khumalo put South Africa ahead in the 20th minute. Siphiwe Tshabalala sent a corner kick across the box where Khumalo was able to head the shot past French goalkeeper Hugo Lloris.
France played much of the match down a man after Yoann Gourcuff was sent off in the 25th minute. About 12 minutes later, South Africa made the score 2-0 when Mphela converted a pass from Tsepo Masilela.
France got its first goal of the tournament 70 minutes into its final game. Florent Malouda had a clear shot after good work by Franck Ribery, before Malouda took the ball and drew the attention of South African goalkeeper Moneeb Josephs.