The 3,000–dwt Oriental Glory (built 1993) was attacked off south-east Malaysia late on Tuesday, the country’s navy said.
The gunmen also damaged communication equipment.
The crew were unhurt, AFP reported.
The vessel was heading from Singapore to Borneo.
The attack highlights the increasing frequency of incidents in what is becoming a piracy hotspot.