The 34-year-old has scored 5,669 runs with 15 centuries and 31 half-centuries in 73 Tests.
Karachi: Sarfaraz Ahmed has been sacked as Pakistan's Test and T20I skipper.
"It has been an honour to lead Pakistan at the highest level. I want to thank all my colleagues, coaches and selectors who have helped me in this journey. My good wishes are with Azhar Ali, Babar Azam and the Pakistan cricket team, and I hope they will continue to grow stronger and stronger," Sarfaraz Ahmed said in an official statement.
Replacing Sarfaraz, Azar Ali has been appointed as the Test captain while Babar Azam has been handed over the reins in the shortest format of the game.
"There is no bigger honour than to captain the Pakistan national cricket team in the pinnacle format of the game. I feel humbled, excited and privileged, and with the support of the team, look forward to justifying the faith that has been entrusted upon me for the World Test Championship," Ali said.
"Sarfaraz Ahmed has done an excellent job in transforming raw talent into experienced players and I now look forward to inspiring those skillful players in our endeavors to collectively achieve our World Test Championship objectives and beyond," he added.
Pakistan played nine matches in the World Cup in which they managed to win five while they lost three matches.
The team faced huge criticism after they lost against India by 89 runs. They were ranked at the fifth spot in the teams' rankings of the tournament and could not qualify for the semi-finals as only the top four teams were awarded the knockout spot.
In April 2016, Sarfaraz was appointed as the Pakistan captain for the T20Is before being elevated as the ODI captain in early 2017. He was then named captain across all formats following the 2017 tour of the West Indies.
Sarfaraz had captained Pakistan in 13 Tests, 48 ODIs and 34 T20I out of which he won four, 26 and 29 matches respectively.
The appointments were confirmed after Sarfaraz's was left out of both formats due to the drop in his form during the fast few series.
"To be named the captain of the No.1 ranked side in the world is the biggest thing that has happened to my career to date. I am ready for this challenge and also willing to learn more in the process. I feel it has been a natural progression for me and I am delighted that the PCB has put faith in my capabilities," Azam said.
"Sarfaraz Ahmed has led the side in the shortest format by example and it is my responsibility to take forward his accomplishments so that we remain a consistent, attractive and powerful side," he added.
Ali has been a vital cog in Pakistan's batting line-up since making his debut against Australia in 2010. The 34-year-old has scored 5,669 runs with 15 centuries and 31 half-centuries in 73 Tests.
Pakistan is slated to play against Australia in two Tests and three T20Is in Australia later this year. The series against Australia will be followed by Test series against Sri Lanka and Bangladesh.
Pakistan will face Australia in the first T20I on November 3