The move was requested by Prime Minister Muhyiddin Yassin, and allows Mr Muhyiddin to suspend parliament at a time when his government is weakened.
The palace said the emergency would last until 1 August, unless cases were brought under control earlier.
Critics say it allows Mr Muhyiddin's unstable government to cling to power.
The prime minister came to power in March last year with a thin majority, but was facing threats from coalition allies to withdraw support for his government, triggering a snap election.