It’s the first time Pakistan has won an ODI series in South Africa since 2013.
Fakhar made 101 and captain Babar Azam 94 from 82 balls to propel Pakistan to 320-7 batting first at SuperSport Park.
Opener Fakhar Zaman hit a second successive century to help Pakistan win the deciding one-day international against South Africa by 28 runs and take the series 2-1 on Wednesday.
Left-arm spinner Mohammad Nawaz and fast bowler Shaheen Shah Afridi collected three wickets each.
On the other hand, Imam-ul-Haq did well to bring up his ninth ODI half-century before getting caught at long-on in the 22nd over. Pakistan was off to a good start in the final ODI as the opening batting-duo enjoyed a 112-run partnership before Maharaj got the Proteas its first breakthrough.
Pakistan 320/7 (Fakhar Zaman 101, Babar Azam 94; Keshav Maharaj 3-45), South Africa 292/10 (Janneman Malan 70, Kyle Verreynne 62; Mohammad Nawaz 3-24)