Melatonin is an indoleamine hormone secreted by the pineal gland. It has antioxidation and anti-apoptosis effects and a clear protective effect against cardiovascular diseases. Our previous studies demonstrated that embryonic exposure to sodium arsenite (NaAsO2) can lead to an abnormal cardiac development. The aim of this study was to determine whether melatonin could protect against NaAsO2-induced generation of reactive oxygen species (ROS), oxidative stress, apoptosis, and abnormal cardiac development in a zebrafish (Danio rerio) model. We found that melatonin decreased NaAsO2-induced zebrafish embryonic heart malformations and abnormal heart rates at a melatonin concentration as low as 10−9 mol/L. The NaAsO2-induced oxidative stress was counteracted by melatonin supplementation. Melatonin blunted the NaAsO2-induced overproduction of ROS, the upregulation of oxidative stress-related genes (sod2, cat, gpx, nrf2, ho-1), and the production of antioxidant enzymes (Total SOD, SOD1, SOD2, CAT). Melatonin attenuated the NaAsO2-induced oxidative damage, DNA damage, and apoptosis, based on malonaldehyde and 8-OHdG levels and apoptosis-related gene expression (caspase-3, bax, bcl-2), respectively. Melatonin also maintained the control levels of heart development-related genes (nkx2.5, sox9b) affected by NaAsO2. In conclusion, melatonin protected against NaAsO2-induced heart malformations by inhibiting the oxidative stress and apoptosis in zebrafish.