The Supreme Court said Sharif is not fit to hold office and ordered a criminal investigation into him and his family. The court also disqualified Finance Minister Ishaq Dar.
The Prime Minister's office said in a statement that Sharif has "stepped down" despite having "serious reservations" about the judicial process.
Sharif, 67, has always denied any wrongdoing and has dismissed the investigation into him as biased and inaccurate.
Sharif's allies have alleged there was a conspiracy to unseat him.
"This is not accountability, it is revenge," tweeted Railways Minister Khawaja Saad Rafiq hours before the verdict was announced. "In an effort to dislodge us, the democratic system has been made a target."
Sharif's two previous stints in power were also cut short, including by a military coup in 1999, but he came back from exile to win a resounding victory in the 2013 general elections.
(FRANCE 24 with REUTERS)