The tourists, restricted to a modest 115-6 after electing to bat, bounced back to stop Sri Lanka at 103-9 in front of a packed house of 30,000 at the Premadasa stadium.
Duminy top-scored with 51 off 52 balls to help the tourists recover from a poor start and then grabbed three wickets for 18 runs, earning himself the man of the match award.
It was a morale-boosting win for South Africa over the world's top-ranked Twenty20 side following an embarrassing 4-1 defeat in the last one-day series.
Kumar Sangakkara put up a fight for the hosts with an unbeaten 59 off 53 balls, but young opener Kusal Perera (11) was the only other batsman to reach double figures.
With 21 runs needed off the last two overs and three wickets in hand, left-arm seamer Wayne Parnell swung the game South Africa's way by removing Sachithra Senanayake and Lasith Malinga without conceding a run in the penultimate over.
Sangakkara hit two boundaries in Morne Morkel's final over, but it was not enough to carry his team to victory.
Morkel and Parnell finished with two wickets each. South Africa's Twenty20 captain Faf du Plessis was delighted by his team's win.
David Miller (25) shared a fifth-wicket stand of 56 with Duminy after the Proteas slumped to 50-4 in the 11th over.
Off-spinner Senanayake, who shared the new ball with Malinga, struck in each of his first three overs to reduce South Africa to 23-3 by the sixth over.
The second and third matches will be played in Hambantota on Sunday and Tuesday.


Latest News from Sports News Desk