De Villiers had kept wickets during last season's home series against the West Indies when Quinton de Kock was injured.
But before that he had kept wickets in a Test match since the 2013-14 home series against Australia.
"One of the issues that concerned us during the tour to India was the lack of depth to our batting, particularly in the lower order and the change in AB's role means that we can now have a specialist batsman at No.7," Cricket South Africa (CSA) selection convener Linda Zondi said.
"The return to South African conditions made it inevitable that we would only choose one specialist spinner with JP Duminy and Elgar both available as back-up and Dane (Piedt) is the man in possession," he said.
More From This Section
"Our batting line-up has served us well in the past in matches under our own conditions and I am confident they will be ready for the challenge in what is going to be a very tough series in which experience will play a vital role," Zondi concluded.
The second match will be played at Newlands from January 2.
Both De Kock and Dane Vilas, who kept wickets in one Test match in Bangladesh this year and then throughout the recent Freedom Series in India, will turn out for South Africa A in their fixture against England next weekend.
Vilas will captain the side and keep wickets while De Kock will bat at No.4.
De Villiers' return to an all-rounder role will enable Temba Bavuma to return to his normal batting position in the middle-order while Dean Elgar and Stiaan van Zyl will resume their opening batting partnership at the top of the order.
With Vernon Philander on the injury list, Kyle Abbott retains his place in the four-man fast bowling attack along with Dale Steyn, Morne Morkel and Kagiso Rabada.
South Africa Test squad: Hashim Amla (Capt), AB de Villiers (Vice-Capt), Kyle Abbott, Temba Bavuma, JP Duminy, Faf du Plessis, Dean Elgar, Morne Morkel, Dane Piedt, Kagiso Rabada, Rilee Rossouw, Dale Steyn, Stiaan van Zyl (Cape Cobras).