HONG KONG — Malaysia’s prime minister, Najib Razak, dismissed his deputy prime minister and the attorney general on Tuesday amid a scandal involving a government-owned development fund that has roiled the country’s top levels of political power.

The moves came two days after Deputy Prime Minister Muhyiddin Yassin, in a speech, called on Mr. Najib to answer questions about the heavily indebted fund, 1Malaysia Development Berhad, also known as 1MDB. Mr. Najib appeared to suggest on Tuesday that his decision to remove Mr. Muhyiddin from office was related to the speech.

“Members of the cabinet should not air their differences in an open forum that can affect public opinion against the government and Malaysia,” Mr. Najib said in a televised statement announcing the removal of Mr. Muhyiddin and four other members of the cabinet.

Mr. Najib added that he “must have a solid and unified team moving in the same direction.”

In a statement posted on Facebook, Mr. Muhyiddin said that he accepted his removal and supported the leadership of the prime minister, and acknowledged that he had been dismissed because of his position on the 1MDB investigation.