Duminy first hammered three fours and a six in his innings of 51 as South Africa put on just 115 for six after deciding to bat first, with off-spinner Sachithra Senanayak taking a wicket in each of his first three overs to undermine the Proteas' charge.
Buoyed by his knock, however, Duminy claimed three key wickets as Sri Lanka fell short, with Kumar Sangakkara's 59 not out ultimately in vain as the tourists drew first blood in this three-match series.
They lost the preceding one-day series 4-1 and made a poor start to their innings, with opening batsmen Quinton de Kock and Henry Davids both falling lbw to Senanayak, who then bowled captain Faf du Plessis.
After AB de Villiers fell to Angelo Mathews, Duminy and David Miller took it upon themselves to steady the ship. The pair rotated the strike to great effect while Duminy unleashed the shackles with a heave for six over deep square-leg off Ajantha Mendis.
Miller (25) also cleared the ropes over long-on off the same bowler for his only boundary before hammering Lasith Malinga to the deep extra cover boundary, having put on 56 for the fifth wicket alongside Duminy, who fell in the final over to Mendis shortly after bringing up his 50 when he picked out Tillakaratne Dilshan at deep midwicket.
Sri Lanka's chase was undermined by the steady fall of wickets, starting when Kusal Perera miscued Morne Morkel to debutant David Wiese at point in the fourth over.
Dinesh Chandimal looked to have settled to his task when he hammered Morkel for two fours in an over but he fell soon after after edging Lonwabo Tsotsobe behind, while Dilshan scored just nine off 19 balls before he became Duminy's first victim, picking out De Villiers at long-on.
Sri Lanka's hopes looked increasingly desperate when Duminy then accounted for Mathews and Jeevan Mendis with successive balls, while their last recognised batsman, Lahiru Thirimanne, also fell for a single figure score.
Sangakkara, who scored a hundred and two half-centuries in the ODI series between the two teams, kept Sri Lanka in the hunt and brought up his 50 with his seventh four the ball after Thisara Perera had fallen to Morkel.
The veteran wicketkeeper hammered two more fours off Morkel in the final over to leave Sri Lanka needing 13 off three balls, but the paceman recovered as the hosts ended their innings on 103 for nine.