"Troops encircled him for days," a military official told the AFP news agency.
Qasab's arrest was the third in a series of recent high-profile detentions in Swat.
Last week, the military announced it had arrested Muslim Khan, the Pakistan Taliban's spokesman, and Mahmood Khan, another senior Taliban commander, along with four other Taliban leaders in a Swat raid.
Pakistan's military launched a major offensive against the Taliban in Swat and neighbouring areas in the country's North West Frontier Province in April.
The fighting displaced nearly two million people and left more than 1,800 Taliban fighters dead, according to the military.
But analysts said that many of the fighters simply melted away into other areas in the face of the military onslaught.
Sporadic skirmishes continue to take place, though Yusuf Reza Gilani, Pakistan's prime minister, has said that Taliban fighters had been "eliminated" in the region.
Pakistan is under intense US pressure to crack down on fighters in its northwest region along the Afghan border, especially the lawless tribal belt where Osama bin Laden, the leader of al-Qaeda, is believed to be hiding.
The US has said the fighters use Pakistan's tribal areas and other troubled parts of the northwest as safe havens from which to plan attacks on Western troops across the frontier.