Two witnesses said most of those killed in Saturday's airstrikes, which struck the village of Sayed Ramazan in northern Kunduz province, were civilians.
The Khanabad district in the province where the village is located is Taliban-controlled, reports AP.
The Afghan Defense Ministry, however, said the airstrikes killed 30 Taliban fighters, but added an investigation was being made into claims that civilians were among those killed.
The airstrikes come as Taliban and government-appointed negotiators are meeting for the first time in Qatar to discuss the future of Afghanistan and an end to decades of war and conflict.
Villagers said an initial airstrike targeted a house belonging to a Taliban fighter, whose home doubled as a checkpoint for stopping and frisking people to ensure they were not connected to the government. The explosion set fire to a nearby home, trapping a family inside, said Latif Rahmani, who witnessed the airstrikes and spoke to the AP by phone.
Rahmani said farmers and villagers ran to douse the fire and rescue trapped family members inside when a second airstrike hit, killing many of them.
Rahmani, who said he was working on his house at the time of the airstrike, warned his neighbors against running toward the burning buildings for fear of a second airstrike.
"I yelled at people and told them not to go because maybe there would be another bombing, but they ran to help and to put out the fire," Rahmani said.
A second witness in the area, Kalamuddin, who like many Afghans uses just one name, said the lone Taliban fighter who lived in the house that was initially hit had been killed. He said five children were among the 24 civilians that were killed.
Taliban spokesman Zabihullah Mujahid condemned the airstrikes and said the Taliban had no military operations in the area at the time of the airstrike.
The United Nations has harshly criticized both sides in the conflict for the relentless killing of civilians in Afghanistan's protracted war. A U.N. report said 1,282 Afghan civilians were killed in the first half of 2020, down 13% from 2019.
The peace talks in Qatar are part of a U.S.-brokered deal with the Taliban that will eventually lead to US withdrawal of American troops from Afghanistan.
In late July, an Afghan government airstrike killed at least 14 people in the western Herat province, many of them women and children. Witnesses said hundreds of people had gathered to welcome home a former Taliban fighter freed from jail when aircraft pounded the gathering.
Earlier that month, Afghan national army personnel fired mortars into a busy market in southern Helmand, killing 23 people. The Defense Ministry is still investigating the incident.
Also Saturday, at least six rockets were fired at NATO's Resolute Support base in southern Kandahar. No casualties were reported and no one claimed responsibility. NATO said in a statement that if the Taliban were behind the rocket fire, it could jeopardize the US peace deal in which the Taliban have promised not to attack US and NATO forces.