South Africa captain Faf du Plessis led from the front scoring 85 in his team's imposing 163 for three in 20 overs after electing to bat first.
Jean-Paul Duminy continued his top form with a run a ball unbeaten 51.
Sri Lanka took off to a strong start as Dilshan and Mahela Jayawardene added 67 runs before Jayawardene (33) was out in the sixth over.
The start and 20 runs in the 18th over by Thisara Perera enabled Sri Lanka to chase down the score with 11 deliveries to spare.