The hosts won the toss at the Wanderers Stadium, asked Sri Lanka to bat and bowled them out for 231, a total South Africa overtook with more than 11 overs to spare.
Du Plessis made 112 not out as South Africa cruised to victory and then praised veteran leg-spinner Imran Tahir for ensuring South Africa chased a modest total.
Tahir took three for 26 in ten overs as Sri Lanka were bowled out for 231 after being sent in on a good batting pitch. He twice broke partnerships that threatened to take Sri Lanka to a challenging total.
"He is probably my biggest weapon as a captain over the years," Du Plessis said of Tahir.
But the captain added that early strikes by Lungi Ngidi, playing in his first international match since suffering a knee injury in November, had also been important.
"Imran bowled brilliantly in the middle overs today but it is really important to get wickets with the new ball," said Du Plessis.
Ngidi took the first two wickets to reduce Sri Lanka to 23 for two.
Tahir, who turns 40 later this month, was not included among Cricket South Africa's contracted players, announced last week. But he showed he remains a key member of the country's one-day bowling attack with an immaculate performance.
Tahir ended a third wicket stand of 76 between Kusal Perera (33) and Oshada Fernando (49) when he had the left-handed Perera caught behind off a googly during a first spell of one for 18 in seven overs.
Kusal Mendis, who top-scored with 60, added 94 for the fifth wicket with Dhananjaya de Silva (39) before Tahir dismissed both batsmen in the first two overs of his second spell.
Sri Lankan captain Lasith Malinga rued the failure of his batsmen to capitalise on good starts.
"We lost wickets at crucial times," he said, pointing out that on both occasions when a promising partnership was broken the other 'in' batsman had been dismissed almost immediately.
Fernando, making his one-day international debut was run out one short of a half-century in Tahir's next over after Perera's dismissal. - AFP