The bodies were found on Tanjung Leman beach near the southeastern town of Mersing, said Saiful Lizan Ibrahim, local head of the Malaysian Maritime Enforcement Agency.
"Security forces found the two bodies -- both men -- believed to be Indonesians," he said, adding that a sea search has been suspended due to bad weather.
The boat was believed to be carrying about 40 Indonesian illegal immigrants when it capsized in rough seas off Mersing.
Two passengers were rescued and taken to hospital.
The 27-foot (nine metre) boat, designed for only 15 people, was travelling from Indonesia's Batam Island to Malaysia, Saiful said.
Some 45 officers were combing the shore in search of survivors.
Indonesian illegal migrants often make the perilous journey in small rickety boats to Malaysia in search of work, mainly in construction and agriculture.
Last November a speedboat believed to be carrying illegal Indonesian migrant workers returning from Malaysia sank near Batam. More than 40 people were missing.
Published : January 24, 2017
By : Agence France-Presse