The company’s boss said the move was in response to “one of the biggest humanitarian crises of our time”.
He said the firm felt a responsibility to step up.
Chief executive Brian Chesky added: “I hope this inspires other business leaders to do the same. There’s no time to waste.”
“As tens of thousands of Afghan refugees resettle around the world, where they stay will be the first chapter in their new lives. For these 20,000 refugees, my hope is that the Airbnb community will provide them with not only a safe place to rest and start over, but also a warm welcome home,” he said.
The offer starts immediately and the company said it was working with non-governmental organisations “on the ground” to help with the most pressing needs.
It has not specified how much the company plans to spend on the initiative or how long refugees will be housed for.
But it said it would collaborate with resettlement agencies and partners “to go where the need goes” and evolve the initiative and its support as necessary
“Starting today, Airbnb will begin housing 20,000 Afghan refugees globally for free,” Mr Chesky tweeted on Tuesday.
“While we will be paying for these stays, we could not do this without the generosity of our hosts.”
The company said the cost of the stays would be funded through contributions from Airbnb and Mr Chesky, as well as donors to the Airbnb.org Refugee Fund.
He said: “The displacement and resettlement of Afghan refugees in the US and elsewhere is one of the biggest humanitarian crises of our time.”
Airbnb said it would release more details soon about how people might help.
The company said: “We know that Airbnb hosts and guests around the world will be eager to stand up and assist this massive effort – and in the coming days, Airbnb and Airbnb.org plan to share details on how hosts and the broader community can support this initiative.”
Property owners who host Airbnb locations have long been encouraged to donate stays at their homes for “people in crisis”.
The scheme began in response to Hurricane Sandy in 2012, when more than 1,000 people needed emergency accommodation after New York city was hit.
Since then, it claims to have helped more than 75,000 people.
The company launched its Open Homes initiative in 2017 to allow its host community to offer their homes for free to people hit by disasters or fleeing conflict.
The initiative has since offered free stays to people affected by the Mexico City earthquake, Californian wildfires, Australian bushfires and other disasters.
It also led to the company setting up its own independent non-profit, Airbnb.org, to focus on helping people share housing and resources with each other in times of crisis.
Last week, it gave emergency funding and support to the International Rescue Committee, HIAS and Church World Service to provide temporary stays for up to 1,000 arriving Afghan refugees.
During the last weekend, it placed 165 refugees in safe housing shortly after touching down in the US.
“Accessible housing is urgently needed and essential,” said David Miliband, president of the International Rescue Committee.