Akila Dananjya bagged 6 wickets for 29 runs and helped the home side to defeat South African by 178 runs in the fifth and final ODI at Khettarama a short while ago.
It was South Africa's third-worst ODI defeat.
Chasing 300 to win, the visitors were bowled out for 121 in 24.4 overs.
Quinton de Kock top scored with 54.
Aiden Markram made 20.
Lahiru Kumara also picked up two wickets.
However, the visitors won the series 3 - 2.
Earlier, Angelo Mathews finished three runs short of a first ODI hundred in Sri Lanka and first against South Africa, but his run-a-ball 97 took Sri Lanka to an imposing total of 299 for 8 on a surface that is slowing down.
As a result, South Africa will need to pull off the highest successful chase at this venue and the hosts can be satisfied with their most complete batting performance in a full inning in this series.
Four fifty partnerships held together with an innings in which Sri Lanka showed aggression against an inconsistent but ever-threatening South African pack.
Keshav Maharaj was the stand-out performer and put in the most economical performance of his short ODI career.
Maharaj's 10 overs cost only 32 runs as he found turn and proved difficult to get away.