A disparate group of American veterans, military contractors, aid workers and former spies is scrambling to get as many people out of Afghanistan as they can before President Biden shuts down the window for rescues in coming days.

Even as tens of thousands of Afghans who helped the U.S. and a large number of American and other foreign citizens remain stranded, Mr. Biden is sticking by his plan to withdraw the remaining military forces from Kabul’s U.S.-controlled airport by Aug. 31.

Erik Prince, the American defense contractor, said he is offering people seats on a chartered plane out of Kabul for $6,500 per person. U.S. and NATO forces are sending special rescue teams into Taliban-controlled areas of the city to spirit their citizens into the airport. And countless Afghans who thought the U.S. would protect them after having assisted the U.S.-led coalition forces in the past two decades are now realizing that they will most likely be left behind, to face Taliban wrath alone.

Private rescue efforts are facing growing obstacles this week, just as the urgency grows. Chartered planes are flying out of Kabul with hundreds of empty seats. New Taliban checkpoints on the road to Pakistan have made driving out of the country increasingly risky. Confusing bureaucratic hurdles have prevented countless people from leaving Afghanistan.

Private rescue efforts have a rapidly narrowing window left to pull off last-minute missions to evacuate people from Afghanistan.

Photo: aamaj news agency/Reuters

“It’s total chaos,” said Warren Binford, a law professor at the University of Colorado who has been working on various evacuation efforts. “What’s happening is that we’re seeing a massive underground railroad operation where, instead of running for decades, it’s literally running for a matter of hours, or days.”

Mr. Biden’s decision to rebuff requests from other Western allies to extend the Aug. 31 deadline means that private efforts by everyone from Mr. Prince to former Secretary of State Hillary Clinton have a rapidly narrowing window left to pull off last-minute rescue missions. Most evacuation flights are expected to end as soon as Friday, to give U.S. troops time to remove their own equipment from the airport and leave safely.

The U.S. and its allies have evacuated more than 70,000 people since the Taliban closed in on Kabul on Aug. 14. In the final days, the focus is shifting to pulling out the remaining Westerners rather than vulnerable Afghans.

“There is no way with the numbers of people on the ground that we will be able to get everybody out by Aug. 31,” said Alex Plitsas, a U.S. Army combat veteran working on rescue operations in Afghanistan.

Private rescue efforts have been ad hoc, scattershot and, at times, divisive. Mr. Prince, whose Blackwater guards were convicted of killing civilians in 2014 while providing security for Americans during the Iraq war, said he was charging each passenger $6,500 to get them safely into the airport and on a plane, and it would cost extra to get people who have been trapped in their homes to the airport. It remained unclear whether Mr. Prince had the wherewithal to carry out his plans.

Most of these evacuation efforts, however, are driven by genuine empathy for Afghan friends and colleagues facing Taliban retribution. The biggest challenge the groups faced was getting people with seats on the charter planes through the gauntlet of Taliban checkpoints, crushing crowds at the airport entrances, and U.S. forces who refuse to let manifested passengers in.

“It’s a combination of tragic, surreal and apocalyptic,” said Stacia George, director of the Carter Center’s Conflict Resolution Program, who has been working round-the-clock to get people out of Kabul. “It’s so frustrating to get high-risk people up to the gate and have them risking their lives to go there and you still can’t get them through. It’s a disaster in slow- and fast-motion.”

The U.S. and its allies have evacuated more than 70,000 people since the Taliban closed in on Kabul on Aug. 14.

Photo: Senior Airman Taylor Crul/U.S. Air Force/Associated Press

Last week, Sayara International, a Washington-based development firm that has long worked in Afghanistan, lined up plans to take 1,000 Afghan refugees to Uganda, whose government has offered sanctuary. Sayara chartered three planes for the operation, said George Abi-Habib, one of the company’s co-founders. Then it ran into a series of obstacles. Marines at the airport gates refused to allow Afghans with seats on the plane to get inside. At one point, Sayara started charging some passengers for seats to fill a cash shortfall it needed to plug before they could fly out of the country, Mr. Abi-Habib said. One Ugandan woman had to crawl through a sewage pipe to get into the airport, he added.

On Tuesday night, after trying unsuccessfully for days to resolve the issues, the 345-seat plane flew out of Kabul with 50 passengers. “We can’t expect everyone to crawl through a sewer pipe to safety,” said Mr. Abi-Habib. “The window is closing.”

The same thing happened on Sunday to a charter flight heading for Ukraine. Activists brought 40 vulnerable Afghan women to the chaotic airport gates where they carried balloons that said “Ukraine” on them so they could be easily identified. But U.S. soldiers wouldn’t let them through, Ms. George said. The flight, which had been waiting for two days to try to get the women on board, took off without them. In all, said Ms. George, 70 of the 240 seats were empty.

President Biden acknowledged the difficulty of getting thousands out of Afghanistan during a news conference Sunday. He also said U.S. airlines will help with evacuation efforts from staging centers in Europe and the Middle East. Photo: Andrew Caballero-Reynolds/AFP/Getty Images The Wall Street Journal Interactive Edition

Successes have been harder to come by. No One Left Behind, a nonprofit set up to help Afghans who worked with the U.S. government, expects to get 5,000 Afghans out of the country by Thursday, said Doug Livermore, a board member with the group. The School of Leadership, Afghanistan has managed to fly 250 students, staff and faculty to Rwanda in a special operation that allowed the private school to relocate.

One private company flew the president of the American University of Afghanistan, along with his dog and other U.S. citizens, to Switzerland. Georgetown University, Johns Hopkins University and the Truman National Security Project have helped to get hundreds of people out of Kabul in recent days, according to people working on the rescue missions. The Clinton Foundation has been working to get scores of people out of Afghanistan.

Some advocates dubbed the effort the Digital Dunkirk, a reference to the World War II rescue mission by hundreds of private boats that saved more than 330,000 allied forces trapped on a French beach by Nazi forces.

“It’s the most American story we’ve seen in a long time,” said Navy veteran Shawn VanDiver, who has been working to get Afghans safely out of the country. “A bright glimmer of hope in this dark history.”

Write to Dion Nissenbaum at dion.nissenbaum@wsj.com