Opener Hashim Amla claimed his 25th ODI century in a successful innings for the Proteas, hitting 103 from 115 deliveries to put his side on course for their 299-6 total after 50 overs.
Sri Lanka hit back and applied some pressure on South Africa, with Niroshan Dickwella making 41 from 33 balls to give his team a glimmer of hope.
However, they could only respond with 203-9 as their challenge fizzled out.
After Dickwella fell, Sri Lanka lost eight wickets for 98 runs to be bowled out for 203, with leg-spinner Imran Tahir claiming 4-27 during a man-of-the-match performance.
The result sees South Africa top Group B ahead of Sunday's showdown between India and Pakistan.