Follow the latest Afghanistan updates
Mr Biden and his wife Jill travelled to Dover Air Force Base in Delaware to meet privately with the families of those killed and then attended the “dignified transfer” of the fallen troops, a military ritual of receiving the remains of those killed in foreign combat.
The Americans killed in last week's ISIS-claimed attack ranged in age from 20 to 31. More than 100 Afghan civilians are believed to have been killed. Some media have said the death toll is as high as 170.
Five of the US troops who died were born not long before the attacks of September 11, 2001, that spurred the US to invade Afghanistan to topple Al Qaeda and dismantle their Taliban hosts who ruled the country.
“The 13 service members that we lost were heroes who made the ultimate sacrifice in service of our highest American ideals and while saving the lives of others,” Mr Biden said on Saturday.
“Their bravery and selflessness has enabled more than 117,000 people at risk to reach safety thus far.”
Family members of the fallen often travel to Dover to be present as flag-draped transfer cases are taken off the transport plane that returns them to American soil.
Secretary of Defence Lloyd Austin and senior military officials stood joined the Bidens as US troops carried the cases down the ramp of an Air Force C-17 aircraft at Dover.
Crying could be heard and a woman collapsed as the remains were loaded into vans for transport to a facility where they will undergo identification and autopsies.
Aside from the quiet commands of honour guards who carry the transfer cases, the short prayers of the chaplain are usually the only words spoken during the ritual.
It is the first time Mr Biden has travelled to Dover as president for such an event, but he is not unfamiliar with the ritual.
In 2016, he attended a dignified transfer for two US soldiers killed in a suicide blast at Bagram Airfield in the final months of his vice presidency.
The 13 troops who died in Kabul were the first US service members killed in Afghanistan since February 2020, when former president Donald Trump's administration negotiated a withdrawal deal with the Taliban.