The court issued its verdict on Thursday afternoon in a case based on the "Panama Papers" leaks that was moved by opposition leaders seeking his removal from office.
Sharif's party declared the verdict a victory for his position that he was prepared to face any investigation.
"The Supreme Court has decided … the same thing that Nawaz Sharif himself had decided six months ago, when he ordered the formation of a commission to investigate [the allegations]," Khwaja Asif, a senior leader of Sharif's ruling PML-N party, told reporters outside the courthouse following the announcement.
Sharif will remain in office during the course of the investigation, which will also focus on his sons Hassan and Hussain, the verdict said.
The bench, which was split 3-2 on the judgment, decided that the source of the funds and assets in question had still not been conclusively established, and it is this that the joint investigation team it has formed will focus on.
It was not immediately clear if there were any implications for Sharif's daughter, Maryam, a prominent leader of his ruling PML-N party.
The judges ordered that the investigative body should be formed within seven days, and include representatives from the Federal Investigative Agency, the Securities and Exchange Commission of Pakistan, the central bank, and other bodies. It will submit fortnightly reports to the Supreme Court.
The allegations focus on Sharif's previous two terms in office in the 1990s, with opposition politician Imran Khan and others alleging the prime minister and his family illegally profited from his position.
Security was tight around the capital Islamabad on Thursday morning, with dozens of police officers deputed to secure the government quarter where the Supreme Court is located.
In 2016, the International Consortium of Investigative Journalists (ICIJ) leaked 11.5 million documents from law firm Mossack Fonseca. Included in those documents were letters showing that three of Sharif's children - Maryam, Hassan and Hussain - were listed as beneficiaries for three companies registered in the British Virgin Islands.
The documents showed these companies were involved in a 2007 loan of $13.8m, made using high-value Sharif-owned properties in the United Kingdom as collateral, and a separate 2007 transaction amounting to $11.2m.
Owning off-shore companies is not illegal in Pakistan, but Sharif's political opponents allege this $25m was gained through corruption during his previous two terms in office as prime minister in the 1990s.
Sharif contends the money is in his children's names and he was therefore not obliged to declare the assets on tax and other disclosure documents. Moreover, he claims it was raised through legitimate business deals, mostly based in the Gulf countries.
Late last year, the Supreme Court took up the case, after months of wrangling between the government and opposition over the formation of a commission to probe the allegations.