By Agence France-Presse
The boat was carrying more than a dozen suspected illegal immigrants from Indonesia, said Awil Kamsari, a spokesman for the Malaysian Maritime Enforcement Agency.
The six bodies, including those of three children, were recovered by Indonesian authorities in Indonesian waters, said Awil.
Two passengers were rescued alive by a fisherman and some villagers in waters near Sabah state on Borneo island on Wednesday evening and taken to hospital.
They told authorities the boat had been travelling from the southwestern coast of Sabah to Indonesia on Tuesday evening when it overturned and sank.
The coast guard said the boat likely sank shortly after it set sail due to bad weather and rough seas.
In January several bodies washed ashore at a beach in the Malaysian state of Johor after a boat believed to be carrying some 40 Indonesian illegal immigrants capsized in rough seas.
Another incident in January saw a tourist boat with Chinese tourists capsize off Sabah. Most were rescued after more than 30 hours.