Staying longer was not an option, Mr Biden said in an address to the nation, a day after the end of a 20-year US presence in Afghanistan.
He praised troops for organising an airlift of more than 120,000 people wishing to flee the Taliban regime.
The Islamist militants have been celebrating what they call a victory.
US-led troops went into Afghanistan in 2001, ousting the Taliban in the wake of the devastating 9/11 attacks, blamed on al-Qaeda – a militant jihadist group then based in the Asian country.
Mr Biden has been widely criticised – at home and by his allies – over the abrupt manner of the US withdrawal, which led to the unexpected collapse of the Afghan security forces US troops had trained and funded for years.
Taliban militants were able to reclaim control of the whole country within 11 days – finally entering the capital, Kabul, on 15 August.
President Biden deployed nearly 6,000 troops to seize control of the airport to co-ordinate the evacuation of US and allied foreign nationals and local Afghans who had been working for them.
Thousands of people converged on Kabul international airport in the hope of being able to board one of the evacuation flights.
In Tuesday’s address, Mr Biden praised troops for the mass evacuation and promised to continue efforts to bring out those Americans who were still in Afghanistan and wanted to return – about 200 people altogether.
But the US leader strongly defended his move to pull out.
“I was not going to extend this forever war, and I was not extending a forever exit,” Mr Biden said, adding: “The war in Afghanistan is now over.”
He said the US did not need troops on the ground to defend itself. (Courtesy BBC)