Recent studies revealed that non-coding RNAs (ncRNAs) play a crucial role in pathophysiological processes involved in diabetic cardiomyopathy (DCM) that contribute to heart failure. The present study was designed to further investigate the anti-apoptotic effect of melatonin on cardiomyocytes in diabetic conditions, and to elucidate the potential mechanisms associated with ncRNAs. In animal models, we induced diabetes in SD rats by single intraperitoneal injection of streptozotocin (STZ) solution (55 mg/kg) at 18:00 in the evening, after a week of adaptive feeding. Our results indicate that melatonin notably alleviated cardiac dysfunction and cardiomyocyte apoptosis. In the pathological situation, lncRNA H19 level increased, along with a concomitant decrease in miR-29c level. Meanwhile, melatonin significantly downregulated lncRNA H19 and upregulated miR-29c levels. In our in vitro experiments, we treated H9c2 cells with high-concentration glucose medium (33 mM) to simulate the state of diabetes. It was verified that positive modulation of miR-29c and inhibition of lncRNA H19, as well as mitogen-activated protein kinase (MAPK) pathways, distinctly attenuated apoptosis in high-glucose-treated H9c2 cells. A luciferase activity assay was conducted to evaluate the potential target sites of miR-29c on lncRNA H19 and MAPK13. LncRNA H19 silencing significantly downregulated the expression of miR-29c target gene MAPK13 by inducing miR-29c expression. Most importantly, our results show that melatonin alleviated apoptosis by inhibiting lncRNA H19/MAPK and increasing miR-29c level. Our results elucidate a novel protective mechanism of melatonin on diabetic cardiomyocyte apoptosis, which involved the regulation of lncRNA H19/miR-29c and MAPK pathways, providing a promising strategy for preventing DCM in diabetic patients.