Neither side had the chance of reaching the semi-finals of the tournament as England, New Zealand, India and the West Indies had already taken the final four spots.
Sri Lanka, who lost the toss and were put into bat, had a steady start as the first-wicket partnership between Dinesh Chandimal and Tillakaratne Dilshan reached 45 runs before the former was bowled out for 21 by Aaron Phangiso.
Dilshan top-scored with 36 before getting trapped lbw by Farhaan Behardien in the 13th over, but South Africa managed to dismiss Sri Lanka's innings with three balls to spare.
The Proteas had a target of 121 runs to win and they managed to reach that target largely because of Hashim Amla, who ended the match unbeaten after hitting 56 off 52 balls.
Du Plessis hit 31 off 36 balls before he was dismissed, while AB de Villiers (20 not out) helped South Africa reach their target with 14 balls left to bowl.