Victory would have taken Sri Lanka level on points with fourth-placed England, but they stay in seventh.
No player scored more than 30 as they were bowled out for a turgid 203 in the final over of their innings.
South Africa won with 76 balls to spare, with Faf du Plessis making 96 not out and Hashim Amla an unbeaten 80.
Sri Lanka remain two points behind England and it is likely they will have to win both of their remaining matches, including beating unbeaten India, and hope other results go in their favour if they are to overtake Eoin Morgan's side.
They made a terrible start, losing captain Dimuth Karunaratne to the first ball of the match, before recovering to reach 67-1 in the 10th over.
Kusal Perera and Avishka Fernando both made 30, but Sri Lanka never recovered from their departures in a 10-ball spell.