In an interview last week, the three-time premier had questioned Pakistan's policy to allow the "non-state actors" to cross the border and "kill" people in Mumbai as he publicly acknowledged that militant groups are active in the country.
His comments triggered a major controversy, inviting criticism from all quarters. The National Security Committee, Pakistan's top civil-military body, condemned the "fallacious" statement by Sharif about the Mumbai terror attack and termed it as "incorrect and misleading".
Lahore High Court Justice Shams Mahmood Mirza dismissed three petitions filed by opposition Pakistan Tehreek-i-Insaf (PTI) and Pakistani Awami Tehreek (PAT) and rights activist advocate Abdullah Malik.
After hearing arguments of the petitioners, Justice Mirza declared them "non-maintainable".
The petitioners contended that Sharif tarnished the country's image.
Sharif, 68, is already being tried in three corruption cases in the Panama Papers scandal in which he is accused of buying properties in the UK through corruption.
"The statement by the former premier benefited India and appeared prejudiced towards the state's safety and the interests, and that apparently Sharif is guilty of high treason as well as offences punishable in terms of the Official Secret Act, 1923 for which he deserves to be proceeded in accordance with law," the petitioners said.
They pleaded the statement of Sharif amounts to "committing treason" against the country.
The opposition parties moved the court on Sharif's interview to Dawn on May 12 in which he had stated: "Militant organisations are active.
"Call them non-state actors, should we allow them to cross the border and kill 150 people in Mumbai? Explain it to me. Why can't we complete the trial? We have isolated ourselves. Despite giving sacrifices, our narrative is not being accepted. Afghanistan's narrative is being accepted, but ours is not. We must look into it".
Resolutions against Sharif have also been brought in the country's three provincial assemblies demanding registration of a treason case against him for his controversial remarks on the 2008 Mumbai attacks.
In one such resolution, opposition PTI also demanded "hang Nawaz Sharif being a traitor".
In addition to this, two applications have been filed in Lahore's police stations seeking registration of FIRs against Sharif.
Ten Lashkar-e-Taiba (LeT) militants killed 166 people and wounded dozens in Mumbai in November, 2008. Nine of the attackers were killed by police while lone survivor Ajmal Kasab was caught. Kasab was executed after a court found him guilty and handed down the death sentence.