Rassie van der Dussen has missed out on being selected in the 15-man squad after sustaining a finger injury in the second Test against England last week which will take at least six weeks to recover after surgery.
Bavuma's participation in the global tournament was in doubt after injuring his elbow in India earlier this year which saw him miss out on the entire England tour.
Rilee Rossouw, who made a successful return to the international fold after six years in the series against England, was included in the squad along with the big-hitting Tristan Stubbs.
"This has been a really tough squad to select, simply because we had so many players in excellent form over the past few months and performing at a level that made the selectors sit up and notice them," South Africa selection chief Victor Mpitsang said.
"Someone like Tristan Stubbs who was not in the frame a year ago has done incredibly well to force his way into the mix based on his performances and his selection should be an inspiration for every young player out there.
"We are also delighted to welcome back our captain Temba Bavuma from injury and we have no doubt his return will further galvanise the team.
"This group of players showed off their brilliant skill and talent when they overcame England in England recently. These sort of performances only bode well for us heading to the World Cup.
"Overall we are delighted with mix of players that have been chosen and look forward to watching them represent the country in Australia."
The Proteas will play a three-match T20 series in India from 28 September before heading straight to Australia for the World Cup.
South Africa T20 World Cup squad: Temba Bavuma (captain), Quinton de Kock, Reeza Hendricks, Heinrich Klaasen, Keshav Maharaj, Aiden Markram, David Miller, Lungi Ngidi, Anrich Nortje, Wayne Parnell, Dwaine Pretorius, Kagiso Rabada, Rilee Rossouw, Tabraiz Shamsi, Tristan Stubbs.
Travelling Reserves: Bjorn Fortuin, Marco Jansen, Andile Phehlukwayo.