Indonesians looking for work sometimes try to enter neighbouring Malaysia illegally by making sea crossings in rickety boats, and accidents happen regularly.
The vessel, believed to be carrying 60 migrants, went down in the morning off Malaysia’s southern state of Johor, the coastguard said.
Soldiers on patrol discovered the bodies of seven men and four women on the shore, coastguard chief Admiral Mohamad Zubil Mat Som told AFP.
Another 20 men and two women were found alive following the voyage from a nearby Indonesian island, and have been taken into custody, he said.
Those missing are believed to have fled into hiding or drowned, and authorities have deployed boats and an aircraft to hunt for them.
“We deeply regret this deadly tragedy,” Mohamad Zubil told AFP. “I urge migrants not to enter Malaysia illegally.”
Relatively affluent Malaysia is home to millions of migrants from poorer parts of Asia, many of them undocumented, and they work in industries including construction and agriculture.