The Proteas, one of the favourites to lift the trophy at Kolkata's Eden Gardens on April 3, lost De Kock and Du Plessis (41) in quick succession, which set the stage for De Villiers to explode.
AB de Villiers announced himself at the World Twenty20 with a swashbuckling 64 and made Afghanistan pay heavily for dropping him twice as South Africa revived their campaign with a 37-run victory at the Wankhede Stadium on Sunday.
Unable to defend a target of 230 runs against England two days ago at the same ground, South Africa chose to bat first after winning the toss and racked up a total of 209 for five in their 20 overs.The plucky Afghans came out all guns blazing in their assault on the target with the diminutive Mohammad Shahzad leading the charge with 44 off 19 balls.
Shahzad, who hit five sixes and three fours, tore into paceman Kyle Abbott in the second over and took 22 runs off him as Afghanistan made a strong start.
The right-hander took Afghanistan to 47-0 in three overs, reminding South Africa of the onslaught by the English batsmen on Friday, before paceman Chris Morris uprooted his stumps.
Afghanistan, who made the Super 10 stage after coming through the qualifiers, were ahead of South Africa's score at the halfway stage on 103 for two but lost too many wickets to keep up with the required run rate.
The lanky Morris showed good control to finish with four wickets, earning him the player of the match award, while leg-spinner Imran Tahir and fast bowlers Abbott and Kagiso Rabada all picked up two wickets each.
South Africa dropped Dale Steyn from the side that lost against England and drafted in seamer David Wiese, who also had a forgettable outing, conceding 47 off his four overs.
Earlier, opener Quinton de Kock (45) continued his impressive show with the bat and added 65 for the second wicket with captain Faf du Plessis after South Africa lost Hashim Amla early in their innings.
The Proteas, among the favourites to lift the trophy at Kolkata's Eden Gardens on April 3, lost De Kock and Du Plessis (41) in quick succession, which set the stage for De Villiers to explode.
The right-hander was first dropped by Samiullah Shenwari on 26 off his own bowling and then again on 35 by the same fielder at midwicket off leg-spinner Rashid Khan.
Rashid was the unfortunate bowler who suffered most from De Villiers's onslaught as the batsman plundered 29 runs in the 17th over with four sixes and a boundary to race past his fifty in 24 deliveries.
De Villiers added 76 for the fourth wicket with left-hander JP Duminy (29 not out), who guided South Africa past the 200-run mark with David Miller (19).
Afghanistan, who also lost their opening match against defending champions Sri Lanka, have little chance to advance past the Super 10 stage after their second loss.