The two dead were likely Myanmar Buddhists killed during a spate of violent incidents in Kuala Lumpur since May 30, said Amar Singh Ishar Singh, the Malaysian capital's deputy police chief.
He added that two other people were in critical condition and the attacks were "believed to be the result of violence in Myanmar."
"The operation is to send a clear message to stop this nonsense and not bring the violence over to Malaysia," he told AFP.
Deadly sectarian strife pitting Myanmar's majority Buddhists against the Muslim ethnic Rohingya minority has flared since last year in the country's western state of Rakhine.
Muslim-majority Malaysia says it is home to more than 80,000 Myanmar nationals, many of them Rohingya fleeing alleged persecution by Myanmar's Buddhist authorities and, more recently, the Rakhine violence.
Amar said more than 250 of those detained in Malaysia were handed over to immigration authorities as they lacked proper documentation.
Myanmar on Tuesday called on Malaysia to take action against those responsible for the attacks and protect Myanmar citizens.
U Maung Hla, who heads the Burma Refugee Organisation in Malaysia, said violence between exiled Myanmar communities here was not uncommon and was "sometimes due to religion."
The Rohingya have been described by the United Nations as one of the world's most persecuted minorities. About 800,000 are estimated to live in Myanmar, which denies them citizenship, rendering them stateless.
Malaysia does not grant Rohingyas refugee status but has turned a blind eye to the steady arrivals.
