Sharif and his children are accused of graft in the ongoing case which has captivated Pakistan and threatened to topple the prime minister after the Panama Papers leak last year linked the family to offshore businesses.
The Supreme Court issued a split ruling calling for a joint investigation team of anti-corruption officials along with the powerful Inter-Services Intelligence (ISI) and Military Intelligence to probe the claims and issue a report within 60 days.
"A thorough investigation is required," Justice Asif Saeed Khosa told the court, presenting the 540-page written judgement which opens with the epigraph that launches Mario Puzo's 1969 novel "The Godfather": "Behind every great fortune there is a crime".
Two of the five judges went further than the ruling, branding Sharif "dishonest" and saying he should be disqualified, but they were outnumbered.
The court has disqualified leaders before, holding former prime minister Yousuf Raza Gilani in contempt in 2012 for refusing to re-open corruption investigations into then president Asif Ali Zardari, resulting in his disqualification.
Government supporters could be seen celebrating the judgement with sweets outside the court in Islamabad, where around 1,500 police commandos and riot forces had been deployed ahead of the highly anticipated decision.
"We will cooperate fully with the investigation, and seek to clear whatever doubts are left," defence minister Khawaja Asif told AFP.
Pakistani cricketer-turned-politician Imran Khan, whose Pakistan Tehreek-i-Insaf (PTI) party has spearheaded the push against Sharif, called on the prime minister to resign until the investigation is completed.
"Whatever explanations they gave inside the Supreme Court about their source of income have been exposed as lies," Khan told reporters in the wake of the judgement Thursday.
The continuing controversy could trouble Sharif's governing party ahead of general elections that must be held by the end of next year, and as security and the economy improve in the militancy-plagued country.