All schools, apart from some in outlying areas, must be shut on Monday and Tuesday, the authorities said.
The haze is caused by forest fires in Indonesia.
It has become a source of regional tension, but Indonesian President Joko Widodo told the BBC it was "not a problem that you can solve quickly".
At least five areas in Malaysia on Sunday recorded "very unhealthy" levels of air pollution, with one reporting "hazardous" levels.
The haze can cause coughs and lung infections.
"We will not compromise with anything that may bring harm to our children in schools," Malaysian Education Minister Mahdzir Khalid said, according to AFP, has reported in BBC.
A marathon has also been cancelled because of fears for the health of 30,000 runners due to take part.