Muhyiddin, who came to power in March 2020, will remain as caretaker until a new premier is appointed, the palace said in a statement.
One government minister wrote on social media that the Cabinet had tendered their resignations to the king and a deputy minister thanked Muhyiddin for his service.
Muhyidddin’s departure will plunge the country into a fresh crisis amid a worsening COVID-19 pandemic.
Malaysia has one of the world’s highest infection rates and deaths per capita despite a seven-month state of emergency and a lockdown since June. Political leaders have begun to jostle for the top post.
Yassin will stay on as Malaysia’s prime minister in a caretaker capacity, the National Palace said in a statement, after the King accepted the leader’s resignation on Monday following an audience at the Palace.
Mr Muhyiddin will perform the prime minister’s duties until his successor is appointed.
In the statement, Malaysia’s King, Sultan Abdullah Ahmad Shah, also added that holding general elections in the near future “is not the best option” due to the welfare and security of the people.
In a televised address on Monday, Mr Muhyiddin said: ”I hope a new government can be appointed swiftly so that the administration will not be disturbed.
“You don’t have to worry. My Cabinet has ordered more than enough vaccines for all of you, and if the vaccination programme goes well, all of you will get vaccinated by the end of October, God willing.”
Having admitted to losing his majority in Parliament, he said: ”I will not conspire with kleptocrats, or interfere with the judiciary or turn my back on the Constitution to stay in power.”