Babar captained Pakistan in all three formats starting October 2019, and led them to number one in ICC One Day International (ODI) rankings for the first time in May.
Opening batter Shan Masood has been announced by the PCB as the new test captain while pacer Shaheen Afridi will be the T20 captain.
Pakistan slid from the spot after finishing fourth in Asia Cup and fifth in the World Cup.
“It’s a difficult decision but I feel it is a right time for this call,” the 29 year-old wrote on X, formerly known as Twitter.
“I will continue to represent Pakistan as a player in all three formats. I am here to support the new captain and the team with my experience and dedication.”
— Babar Azam (@babarazam258) November 15, 2023
His resignation comes two days after Pakistan bowling coach Morne Morkel stepped down.
The PCB accepted his resignation.
“After consultation with his family, Babar decided to step down and PCB stands behind his decision,” they said in a statement.
Azam is ranked by ICC as a top five batsman in all three formats, and is Pakistan’s most successful captain in T20 Internationals with 42 wins.
Pakistan have a tough tour of Australia coming up where they play three Tests, starting in Perth from December 12.
They have lost all of their last 14 Tests in the country with their most recent victory coming back in 1995.