Anwar was jailed again during Najib's rule but is due out in June-and Mahathir has pledged to help him get a royal pardon, allowing him to run for political office again and potentially become prime minister. Their relationship has loomed large over the Malaysian political landscape for decades.
Mahathir, it said, will "inherit an economy that's growing more than 5 per cent, inflation that's subdued and a currency that's been one of Asia's best performers". He will, in fact, also become the world's oldest Prime Minister.
A pardon will mean that Mr Anwar is free to return to politics and could take a seat in parliament.
Mr Mahathir's deputy in the new government is Wan Azizah Wan Ismail, Anwar's wife and the leader of his People's Justice Party.
A video taken on Thursday night showed a relaxed-looking Mr Anwar in his hospital room where he is recuperating after surgery, watching a TV broadcast of Mr Mahathir being sworn in.
Mahathir said after his victory in Wednesday's election that he would not be looking for a scapegoat in the scandal. He was dismissed in 1998 by Mahathir, and then jailed for five years after a questionable conviction for sodomy.
Malaysia will reach out to USA authorities investigating the case, the lawmaker said.
"Whether Anwar will be part of the cabinet or not will be decided when the time comes", he said.
Mahathir's record of curbing civil liberties and his antagonism towards western interests and economic policy made his relationships with the U.S., United Kingdom and Australia, among others, difficult.
"I pray that after this divisive period, the country will unite", he said.
Najib's premiership has been battered by a massive financial scandal, in which he was accused of overseeing the plunder of billions of dollars from sovereign wealth fund 1MDB.
There had been widespread speculation Najib would fly overseas after his shock election defeat this week, amid calls for him to be prosecuted over the sprawling 1MDBcorruptionscandal.
The national stock market was set to be closed on Thursday and Friday after Mahathir declared a public holiday, but the ringgit currency weakened in offshore trading.