Afghan security forces battled the militants inside the city for five days, as the USA carried out airstrikes and sent advisers to help the Afghan ground forces.
Afghan President Ashraf Ghani has called for a conditional cease-fire with Taliban insurgents for the duration of the Eid al-Adha holiday.
Afghan President Ashraf Ghani declared a provisional three-month ceasefire with the Taliban in a televised broadcast August 19, but said the truce would hold only if the militants reciprocated.
Abdul Rahman Aqtash, police chief in neighboring Takhar province, said the passengers were from Badakhshan and Takhar provinces and were traveling to the capital, Kabul.
Zabiullah Mojahid, a Taliban spokesman, told CNN the insurgent group had received reports that there were Afghan security forces among the passengers and they stopped the buses to investigate.
It had been hoped the ceasefire could have been observed until November 20, marking the Prophet Muhammad's birthday.
The Taliban's resurgence in recent years has seen entire districts of Afghanistan fall under its control.
However the offer drew mixed responses among Afghans, with some slamming the idea of welcoming Taliban fighters back into their cities to eat ice cream and pose for selfies like they had during the three-day ceasefire over the Eid holiday in June.
Taliban sources said their leaders had also provisionally agreed a four-day truce during the annual Islamic feast of sacrifice, though supreme leader Sheikh Haibatullah Akhunzada still had to give his final approval.
The largest was the assault on the city of Ghazni, east of Kabul, which sparked a five-day battle with government forces that left hundreds dead or wounded.
"We call on the leadership of the Taliban to welcome the wishes of Afghans for a long-lasting and real peace", he said.
The Western-backed government in Kabul has been struggling to fend off the Taliban and other militant groups since the withdrawal of most North Atlantic Treaty Organisation troops in 2014. He reiterated the group's standing position that the country's 17-year war can only be brought to an end through direct talks with the United States. Since then, American forces, now in a training and advising role, have repeatedly come to the aid of Afghan forces.