Sharif was about to address a gathering at a seminary in Lahore when the student lobbed shoes at him which hit his shoulder.
Video footage of the incident showed Sharif, 68, visibly shaken by the incident.
The student along with his accomplice also jumped on stage where Sharif was standing and chanted slogans praising Mumtaz Qadri, the murderer of former Punjab governor Salman Taseer.
Police identified the shoe thrower as Abdul Ghafoor, a former student of the seminary, and his accomplice as Sajid.
More From This Section
The PML-N leader went ahead with his address and made a brief speech in which he did not mention about the man who threw a shoe at him.
Religious parties especially Tehreek-e-Labbaik Pakistan had held Sharif and his party (PML-N) responsible for making an attempt to change a clause related to finality of Prophet Mohammad (PBUH) in the Constitution.
The incident came a day after a man, Faiz Rasool, hurled ink at Asif, a member of the ruling party and a close Sharif aide, while he was speaking at a party rally in eastern Pakistan.
"This hurt the sentiments of millions of Pakistanis including myself," he said.
Pakistan's Law Minister Zahid Hamid had to resign last November when hundreds of Tehreek-e-Labbaik Pakistan supporters camped at Islamabad's Faizabad traffic interchange forcing the PML-N government to take action against those in the federal cabinet responsible for attempting to change this clause from the Constitution.
The incident drew strong condemnation form all prominent politicians of the country.