Batting first, the South Africans amassed a commendable 189/3 in 20 overs, before the hosts chased the total down in 19.4 overs with only two wickets down.
JP Duminy was South Africa’s best batsman, scoring 68 not out off 32 balls.
Skipper Faf du Plessis had 42 off 27 balls when he was forced to retire hurt, while AB de Villiers also notched 37 off 27 balls opening the batting.
However, India’s Mayank Agarwal stole the show, smashing 87 runs off 49 balls, while fellow opener Manan Vohra made 56 off 42 balls.
The tourists are due to play three Twenty20 internationals and five one-day matches up until October 25, before starting a four-Test series on November 5.
The first T20 is in Dharamshala on Friday.