"As far as Daesh (Islamic State) is concerned, in Pakistan, even a shadow of Daesh would not be allowed," Sharif said in an address to The Royal United Services Institute for Defence and Security Studies in London on Friday.
In May, the Islamic State militant group claimed the killings of at least 43 members of the Shiite Ismaili minority in Pakistan's southern port city of Karachi.
Leaflets backing IS jihadists have been seen recently in parts of northwest Pakistan and pro-IS slogans have appeared on walls in several cities.
Sharif said dealing with the extremist group was set to become an ever greater challenge than the Al-Qaeda network behind 9/11 attacks in the United States.
Also Read
"I feel the future challenge is Daesh. It's a bigger name. Al-Qaeda was a name but Daesh is now a bigger name," Sharif said.
The General, popular for taking on militants from northwestern Pakistani tribal areas bordering Afghanistan to criminal gangs in Karachi, emphasised the reconciliation between Afghan Taliban and the Afghan government. He expressed his fear the Taliban could seek an alliance with Daesh unless they were brought back to the negotiating table.
Pakistan, which supported the Taliban during the 1990s, has blown hot and cold over the insurgency while contending it was working to bring about Afghan reconciliation.
Islamabad organized the first set of direct peace talks between the Taliban and the Afghan government in July. But another round scheduled around later that month was stalled following the announcement of the death of Taliban founder Mullah Omar.
The army intensified its offensive after last year's Peshawar school attack which killed 151 since when there has been a lull in violence.
The last major attack in the city came in February when three heavily armed Taliban militants stormed a Shiite mosque, killing 21 people.
Overall levels of violence have dropped dramatically this year, with 2015 on course for the fewest deaths among civilian and security forces since 2007 -- the year the Pakistani Taliban umbrella group was formed.