Gen Sir Nick Carter said: "It was the pace of it that surprised us and I don't think we realised quite what the Taliban were up to."
Asked whether military intelligence was wrong, he said the government received intelligence from a variety of sources.
"It's not purely about military intelligence," he said.
The last British and US troops left Afghanistan a week ago, bringing their 20-year military campaign in the country to an end.
There has been criticism of the way the West withdrew from Afghanistan, with questions over how the Taliban was able to seize control of the country at such speed.