Set 151 for victory, Pakistan were 112 for four needing 39 from 32 balls for the win before Imran Tahir bowled Shoaib Malik (15) and Abdul Razzaq (0) in successive balls.
Wayne Parnell then had innings top-scorer Sohaib Maqsood (37) caught by wicketkeeper Quinton de Kock at the start of the next over to rock the sub-continent side.
They never quite recovered and as the run-rate slowed, South Africa were able to turn the screw.
The key wicket of Shahid Afridi (14) with eight balls remaining sealed Pakistan's fate and they ended their 20 overs on 144 for nine.
Parnell finished with three for 25 in his four overs and was ably supported by Dale Steyn (two for 20) and Tahir (two for 21).
South Africa, who claimed the two-match series 2-0, had earlier won the toss and elected to bat with their top three doing the damage.
Captain Faf du Plessis top scored with a fine 58 not out from 48 balls that included three sixes, while Hashim Amla rediscovered his form with 48 from 41 balls.
Exciting young opener De Kock hit six fours in his 30 from 19 balls as the Proteas posted 150 for five in their 20 overs.
Saeed Ajmal was again the pick of the Pakistam bowlers with three for 25 in his four overs, while Sohail Tanvir collected two for 21 in his four.
The sides now travel to South Africa for a two-game T20 and three-match one-day international series starting on Wednesday.
Image: Wayne Parnell
Photograph: Getty Images