In a White House speech, Biden set a goal of withdrawing all 2,500 U.S. troops remaining in Afghanistan no later than Sept. 11, with the final withdrawal beginning on May 1.
"It is time for American troops to come home," he said.
Sept. 11 will mark 20 years to the day of al Qaeda's attacks on the United States that prompted then-President George W. Bush to launch the conflict. The war has cost the lives of 2,400 American service members and consumed an estimated $2 trillion. U.S. troop numbers in Afghanistan peaked at more than 100,000 in 2011.
Afghan President Ashraf Ghani wrote on Twitter that he has spoken with Biden and he respects the U.S. decision. Ghani added that "we will work with our U.S. partners to ensure a smooth transition" and "we will continue to work with our US/NATO partners in the ongoing peace efforts."
The Democratic president had faced a May 1 withdrawal deadline, set by his Republican predecessor Donald Trump, who tried but failed to pull the troops out before he left office. Biden's decision will keep troops in Afghanistan past that deadline, but officials suggested troops could fully depart before Sept. 11.