The ruling was hailed as a vindication by Khan's opposition Pakistan Tehreek-e-Insaf (PTI) party but drew questions from Sharif's ruling Pakistan Muslim League-Nawaz, which had filed the case.
The two parties will contest general elections in 2018, along with the Pakistan People's Party and several smaller parties.
"No dishonesty or omission can be attributed to (Khan). This petition has no merits and is hereby dismissed," Chief Justice Saqib Nisar told the court.
Khan had led the legal drive that led to Sharif being disqualified in July over unreported income and the opening of a criminal corruption case against the former prime minister.
A lawmaker from Sharif's ruling party filed a separate complaint late last year alleging Khan and PTI secretary general Jahangir Tareen owned offshore companies and had not disclosed their assets.
While Khan was cleared on Friday, the Supreme Court disqualified Tareen.
"The respondent is declared not to be an honest person. He ceased to be member of the parliament. The respondent is disqualified," Nisar said of Tareen.
PTI spokesman Naeem Ul Haq said the party was disappointed with the judgement on Tareen.
A senior PML-N leader, Miftah Ismial, told Reuters the party accepted Friday's Supreme Court decision as final.
"However, not being a lawyer I don't follow how Imran Khan was not considered an owner of the offshore company ... given that the flat owned by it was only used by Imran Khan and the sale proceeds from the flat also went to Imran Khan."
Sharif's supporters have alleged that some elements of Pakistan's military may have had a hand in the court's disqualification of the former prime minister.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)