De Villiers had suffered a blow to his left knee a day before the fifth ODI. Though the former skipper featured in the last two games but he was absent when the Proteas trained on Saturday.
"He suffered a blow to the knee while batting ahead of the fifth ODI, and although he passed a fitness test on Friday, the injury worsened significantly throughout the match," Mohammed Moosajee, South Africa's team manager, was quoted as saying by ESPNcricinfo.
In a release, Cricket South Africa further said that de Villiers has been advised rest to allow him a full recovery ahead of the four-Test series against Australia starting in Durban on March 1 .
De Villiers had suffered an injury to his right index finger during the third Test against India and had missed the first three one-dayer.
South Africa fielded a depleted side for the T20Is after Faf du Plessis and Quinton de Kock were ruled out with a fractured finger and a left wrist injury respectively.
Image: AB de Villiers
Photograph: Reuters
India's leggie spin-twins leave Wessels, Tendulkar impressed
1-5 series loss not embarrassing, just disappointing for Markram
Kohli says SA should show patience with captain Markram
Shastri just can't stop praising leader Kohli
Sublime Kohli thanks wife Anushka for his rich form