Abbas has taken 90 wickets in 25 Tests, but hasn't played red-ball cricket for Pakistan since the Jamaica Test in 2021.
He has been in impressive recent form, picking up 31 wickets in five premier domestic four-day tournament matches.
"Shaheen Shah Afridi's exclusion from the Test squad is a strategic decision to ensure he remains physically and mentally fresh for the Champions Trophy," selection committee member Aaqib Javed said in a statement on Wednesday.
Pakistan paceman Shaheen Shah Afridi is being managed ahead of the Champions Trophy. (AP PHOTO)
Naseem Shah, who missed the last two home Tests against England, Khurram Shahzad and left-armer Mir Hamza are the pace bowlers named to the Test squad.
Pakistan begin their tour of South Africa on Tuesday with three T20s, followed by three ODIs and two Test matches at Centurion and Cape Town.
"We have adopted a horses-for-courses policy to ensure all three squads are well-balanced and capable of performing strongly in South Africa," said Javed, who was also appointed interim white-ball coach ahead of Pakistan's tour to Zimbabwe.
"Our focus in ODIs is to continue building momentum ahead of the Champions Trophy, while the T20 series provides a platform to blend experience with emerging talent."
Off-spinner Sajid Khan missed out on the Test team despite claiming 19 wickets in the past two Tests against England at Multan and Rawalpindi.
Noman Ali, who picked up 20 wickets in those two memorable victories for Pakistan, won the selectors' nod ahead of Sajid.
Spinner Noman Ali (centre) has been retained for Pakistan's Test series against South Africa. (AP PHOTO)
"Leaving out Sajid Khan, despite his stellar performances against England, was an extremely tough and difficult decision," Javed said.
"However, considering the pace-friendly conditions at Centurion and in Cape Town, we opted for Mohammad Abbas instead, who is an outstanding exponent of seam bowling."
Former all-format captain Babar Azam, Mohammad Rizwan, Saim Ayub and Salman Ali Agha were named to all three squads.
The selectors have kept faith in youngster Sufiyan Muqeem for T20s and ODIs after the left-arm wrist-spinner claimed eight wickets in two T20s against Zimbabwe.
Sufiyan also recorded Pakistan's best-ever T20 figures of 5-3 at Bulawayo on Tuesday to help rout Zimbabwe for their lowest T20 score of 57 all out.
TEST SQUAD: Shan Masood (captain), Saud Shakeel, Aamer Jamal, Abdullah Shafique, Babar Azam, Haseebullah Khan, Kamran Ghulam, Khurram Shahzad, Mir Hamza, Mohammad Abbas, Mohammad Rizwan, Naseem Shah, Noman Ali, Saim Ayub, Salman Ali Agha
ODI SQUAD: Mohammad Rizwan, Abdullah Shafique, Abrar Ahmed, Babar Azam, Haris Rauf, Kamran Ghulam, Mohammad Hasnain, Muhammad Irfan Khan, Naseem Shah, Saim Ayub, Salman Ali Agha, Shaheen Shah Afridi, Sufiyan Muqeem, Tayyab Tahir, Usman Khan
T20 SQUAD: Mohammad Rizwan (captain), Abrar Ahmed, Babar Azam, Haris Rauf, Jahandad Khan, Abbas Afridi, Mohammad Hasnain, Irfan Khan, Omair Bin Yousuf, Saim Ayub, Salman Ali Agha, Shaheen Shah Afridi, Sufiyan Muqeem, Tayyab Tahir, Usman Khan