After the World Trade Center came down the U.S. accused al-Qaeda, parts of which were hosted in Afghanistan. The Taliban government offered the U.S. to extradite al-Qaeda chief Osama Bin Laden to an Islamic country to be judged under Islamic law. The U.S. rejected that and decided instead to destroy the Afghan government.
Taliban units, supported by Pakistani officers, were at that time still fighting against the Northern Alliance which held onto a few areas in the north of the country. Under threats from the U.S. Pakistan, which sees Afghanistan as its natural depth hinterland, was pressed into service. In exchange for its cooperation with the U.S. operation it was allowed to extradite its forces and main figures of the Taliban.
U.S. special forces were dropped into north Afghanistan. They came with huge amounts of cash and the ability to call in B-52 bombers. Together with the Northern Alliance they move towards Kabul bombing any place where some feeble resistance came from. The Taliban forces dissolved. Many resettled in Pakistan. Al-Qaeda also vanished.