The Pakistan Cricket Board (PCB) announced the squads for the two home white-ball assignments on Monday, with Farhan handed the T20I captaincy after leading Pakistan at the recently concluded Asian Games.
Salman Agha has been removed as Pakistan's T20I captain, and has also been dropped from the T20I squad.
The three-match T20I series against Sri Lanka will be played at the Rawalpindi Cricket Stadium on October 9, 11 and 13.
Shaheen, meanwhile, will lead Pakistan in the ODI tri-series, which will also feature England and Sri Lanka.
The tournament will begin in Rawalpindi, with the first three matches scheduled at the Rawalpindi Cricket Stadium before the action moves to Lahore for the remaining league games and the final.
The ODI tri-series will get underway on October 18, when Pakistan face Sri Lanka in Rawalpindi. Pakistan will then meet England on October 20, followed by Sri Lanka taking on England on October 22.
The series will move to Lahore from October 25, with Pakistan facing England and Sri Lanka on October 25 and 27 respectively. Sri Lanka and England will meet again on October 29 before the final at Gaddafi Stadium on October 31.
Pakistan's T20I squad: Sahibzada Farhan (C), Abdul Samad, Abrar Ahmed, Arafat Minhas, Fakhar Zaman, Hasan Nawaz, Khawaja Nafay, Maaz Sadaqat, Mohammad Salman Mirza, Muhammad Imran Randhawa, Naseem Shah, Razaullah, Saim Ayub, Shadab Khan and Sufiyan Moqim.
The ODI squad: Shaheen Shah Afridi (C), Abrar Ahmed, Arafat Minhas, Babar Azam, Faheem Ashraf, Fakhar Zaman, Haris Rauf, Hasan Nawaz, Muhammad Ghazi Ghori, Naseem Shah, Razaullah, Saad Baig, Saim Ayub, Salman Ali Agha, Shadab Khan and Sufiyan Moqim.