By Agence France-Presse
One of the suspects, an Indonesian construction worker, had previously wandered around Kuala Lumpur with a knife in an unsuccessful attempt to attack Buddhist monks in revenge for atrocities against Rohingya Muslims in Myanmar, police said.
Hundreds of suspected extremists have been arrested in Muslim-majority Malaysia in recent times, as fears grow that IS is encouraging would-be militants to launch attacks in a country that has never before suffered a major assault.
The latest arrests took place in separate police operations in January and December, with a Malaysian teacher from a religious school detained as well as the construction worker.
The men were "suspected of being involved with the Daesh (IS) terrorist group", said national police chief Mohamad Fuzi Harun in a statement.
The 23-year-old Indonesian was detained in the capital last week and had allegedly been planning to attack police headquarters and other police stations to steal weapons that could be used in attacks.
In November he had scouted an area of downtown Kuala Lumpur with a knife, allegedly planning to target Buddhist monks, but he did not succeed, police said.
There has been an outpouring of sympathy towards the Rohingya in Malaysia since hundreds of thousands fled to Bangladesh from Myanmar, their mainly Buddhist homeland, in the wake of a military-led campaign in Rakhine state.
The suspect, who was not named, had been in contact with a senior IS leader and had raised a flag of the jihadist group at the construction site where he worked, police said.
The Malaysian teacher, 25, was detained outside Kuala Lumpur and had been planning attacks on entertainment outlets around the capital, police said, without giving further details.
He previously served an 18-month jail term under tough internal security laws.