The aim of the present study was to investigate the role of the nucleotide‑binding oligomerization domain (NOD) 2 in high glucose (HG)‑induced myocardial apoptosis and fibrosis in mice. Mouse models of diabetes were induced by streptozotocin (STZ). NOD2 expression was knocked down by injection of lentivirus‑mediated short‑hairpin RNA. Alternatively, small interfering RNA‑NOD2 was transfected into cardiomyocytes and cardiac fibroblasts (CFs). A hemodynamic assay was used to assess the cardiac function in the mouse model. Hematoxylin and eosin, Masson and terminal deoxynucleotidyl transferase dUTP nick end labeling staining was performed to observe pathological changes and injury of myocardial tissue. The expression levels of NOD2, collagen I and III, and transforming growth factor‑β (TGF‑β) and apoptotic proteins were quantified by reverse transcription‑quantitative polymerase chain reaction and western blotting. NOD2 silencing ameliorated diabetes‑induced myocardial apoptosis and fibrosis in mice. NOD2, collagen I, collagen III, TGF‑β and pro‑apoptotic proteins were upregulated in the diabetic cardiomyopathy (DCM) model group, but interference of NOD2 suppressed these alterations in protein expression levels. NOD2 is upregulated in HG‑induced primary cardiomyocytes and CFs. Suppression of NOD2 attenuated HG‑induced cardiomyocyte apoptosis and proliferation of CFs. Overall, NOD2 silencing alleviated myocardial apoptosis and fibrosis in diabetic mice. The results of the present study demonstrated an understanding of the role of NOD2 in diabetes‑induced cardiomyopathy, which provides a novel target and therapies for the prevention and treatment of DCM.