The South African skipper hit a 102-ball 115 studded with ten boundaries and three sixes to lift South Africa who won the toss and decided to bat at Sharjah stadium.
De Villiers lifted the tempo in the final overs, hitting Sohail Tanvir's final over for 25 runs, reaching his 16th hundred with a four towards mid-wicket, which came off 99 balls.
He then hit the left armer for six, four and four to help South Africa add 114 in the last ten overs.
De Villiers was initially slow, reaching his fifty off 70 balls, with a big six off Saeed Ajmal towards mid-wicket.
He added an invaluable 83 for the sixth wicket with Ryan McLaren (27) before lashing out in the final overs.
De Villiers had built the innings with an invaluable 62 runs stand for the fourth wicket with Faf du Plessis who made 89-balls 46 with the help of two boundaries.
South Africa lost opener Hashim Amla as early as off the fifth ball of the innings, trapped leg-before by paceman Mohammad Irfan.
Mohammad Hafeez accounted for Jean-Paul Duminy for two before De Villiers and Du Plessis brought the innings on track.
Paceman Junaid Khan had Du Plessis while Ajmal dismissed David Miller for 15 in his second spell.
South Africa enjoy an unassailable 3-1 lead in the five-match series.
