"Army has the ability and the will to take the fight to the terrorists," he said while paying tribute to Maj Gen Sanaullah Khan and other security personnel killed in four militant attacks over the past two days.
"While it is understandable to give peace a chance through a political process, but no one should have any misgivings that we would let terrorists coerce us into accepting their terms," he said in an apparent reference to the PML-N government's plans to hold talks with the Taliban.
Pakistan's political parties had last week endorsed Prime Minister Nawaz Sharif's plan to hold peace talks with the Taliban and other militants groups who have killed nearly 40,000 people, including several thousand security personnel, over the past seven years.
Kayani reiterated the army's "resolve and unflinching commitment in fighting the menace of terrorism, in accordance with the will of the nation and at any cost", according to a statement issued by the military.