Also back in the 17-man squad is lanky fast bowler Shabbir Ahmed, whose one-year ban over an illegal bowling action ended last month.
"We hope that these players will boost (the) Pakistan team for the one-day series and Razzaq and Ahmed have proved their fitness before our physiotherapist Grant Compton," chief selector Wasim Bari told AFP on Saturday.
Dashing opener Imran Nazir, 25, also earned a recall after two and a half years, mainly for strong performances in domestic competitions.
"Nazir has shown he has overcome his poor form and we have rewarded him for his good showing in the local competitions," said Bari.
Razzaq, 27, missed the Test series between the two nations because of a calf muscle injury.
Pakistan have already been hit by injuries to key pacemen Shoaib Akhtar and Umar Gul, who have both returned home from South Africa.
The 31-year-old Akhtar, sent as a replacement for the injured Gul, tore his hamstring in the second Test in Port Elizabeth. The 23-year-old Gul twisted his ankle during a warm-up match and played no part in the Test series.
Both face a race against time to win a place in the team for the World Cup in the West Indies, starting in March.
The 26-year-old Afridi was dropped because of poor form. He scored just 115 runs and took 14 wickets in 18 one-day matches last year.
Afridi was, however, confident he would regain his touch in South Africa where he performed well for Griqualand West as an overseas player two years ago.
"I know I have to lift my game before the World Cup and I am hopeful that I will be able to do that because I know the South African grounds well," Afridi said.
Leg-spinner Danish Kaneria, paceman Shahid Nazir, batsmen Asim Kamal and Faisal Iqbal will return home after the Test series.
Pakistan will play a Twenty20 international against South Africa in Johannesburg on February 2 before the one-day series starts at Centurion on February 4.
The remaining matches will be played in Durban (Feb 7), Port Elizabeth (Feb 9), Cape Town (Feb 11) and Johannesburg (Feb 14).
Squad: Inzamam-ul-Haq (capt), Younis Khan (vice-captain), Mohammad Hafeez, Yasir Hameed, Imran Farhat, Imran Nazir, Shoaib Malik, Mohammad Yousuf, Shahid Afridi, Kamran Akmal, Abdul Razzaq, Zulqarnain Haider, Rana Naved-ul-Hasan, Shabbir Ahmed, Mohammad Asif, Abdul Rehman and Mohammad Sami.