Around 1.4 million refugees, registered with the UN agency, can live in Pakistan until June 30, 2020, said Ziaur Rehman, an official at the ministry that deals with the issue.
While another 800,000 Afghans, who have not registered with the United Nations High Commission for Refugees (UNHCR), will have to leave by the end of October, Rehman added.
The previous deadline is set to end by June 30.
The Pakistan government decided to expel refugees after the country’s spy agencies blamed them for abetting militants, who killed more than 150 children at a school in 2014.
But the decision was not followed through after objections by humanitarian groups.
Pakistan has since extended the deadline several times.
The latest extension coincides with a visit by Afghan President Ashraf Ghani to Pakistan, seeking to reset ties between the estranged neighbours, after years of mistrust.
The UNHCR is undertaking a voluntary repatriation programme for 1.4 million Afghans, most of them living in Pakistan since their country was invaded by Soviet Russia in 1979.
Around 800,000 Afghans live in Pakistan under the radar, taking the total number beyond two million, Rehman said.