Cardiac development is a peculiar process involving coordinated cellular differentiation, migration, proliferation, and apoptosis. DNA methylation plays a key role in genomic stability, tissue‐specific gene expression, cell proliferation, and apoptosis. Hypomethylation in the global genome has been reported in cardiovascular diseases. However, little is known about the impact and specific mechanism of global hypomethylation on cardiomyocytes. In the present study, we explored the impact of DNA methyltransferase inhibitors 5‐azacytidine on cardiac development. In vivo experiment showed that hypomethylation of zebrafish embryos with 5‐azacytidine exposure significantly reduced survival, induced malformations, and delayed general development process. Furthermore, zebrafish embryos injected with 5‐azacytidine developed pericardial edema, ventricular volume reduction, looping deformity, and reduction in heart rate and ventricular shortening fraction. Cardiomyocytes treated with 5‐azacytidine in vitro decreased proliferation and induced apoptosis in a concentration‐dependent manner. Furthermore, 5‐azacytidine treatment in cardiomyocytes resulted in 20 downregulated genes expression and two upregulated genes expression in 45 candidate genes, which indicated that DNA methylation functions as a bidirectional modulator in regulating gene expression. In conclusion, these results show the regulative effects of the epigenetic modifier 5‐azacytidine in cardiac development of zebrafish embryos in vivo and cardiomyocyte proliferation and apoptosis and the homeostasis of gene expression in vitro, which offer a novel understanding of aberrant DNA methylation in the etiology of cardiovascular disease.