"We should remember those days when armed groups were 100 kilometers (60 miles) away from Islamabad, when women and men used to be butchered in bazaars," he said.
The army chief dismissed suggestions that negotiations were necessary because military operations have failed. Some Pakistan politicians have criticized the military operations, saying that Pakistan is essentially at war with its own people.
"One opinion has surfaced that perhaps the failed military operations forced for the negotiations," the general said. "It is far away from the truth."
Sharif's government appears to have made little progress in negotiating with the militants after a series of deadly bombings. Militants have demanded the government must free their prisoners and pull troops from the tribal regions where the militants have their strongholds for talks to take place. The militants also want an end to U.S. drone strikes.
Kayani is considered one of the most powerful people in Pakistan, but he'll be retiring next month. His successor has not yet been named.