The ruling came after a probe into his family's wealth following the 2015 Panama Papers dump linking Mr Sharif's children to offshore companies.
Mr Sharif has consistently denied any wrongdoing in the case.
The five judges reached a unanimous verdict in the Islamabad court, which was filled to capacity.
"Following the verdict, Nawaz Sharif has resigned from his responsibilities as prime minister," a spokesman for Mr Sharif's office said in a statement.
There was heightened security in the capital, with tens of thousands of troops and police deployed.
One of the judges, Ejaz Afzal Khan, said that Mr Sharif was no longer "eligible to be an honest member of the parliament".
Pakistan's Interior Minister Chaudhry Nisar Ali Khan earlier advised Mr Sharif to accept Friday's verdict.
The court has recommended anti-corruption cases against several individuals, including Mr Sharif, his daughter Maryam and her husband Safdar, Finance Minister Ishaq Dar and others.