Diabetic cardiomyopathy (DCM) is an important complication of chronic diabetes mellitus. However, its pathologic process and pathogenesis have not been fully elucidated. This study aims to investigate the role of ferroptosis in DCM and clarify the effect of heme oxygenase-1 (HMOX1) on DCM by targeting ferroptosis. In vivo, an animal model of DCM is established by subjecting mice to a high-fat diet (HFD) combined with low-dose streptozotocin (STZ) injection. We induce an in vitro DCM model by exposing H9C2 cells to high glucose and palmitic acid. Transcriptome sequencing reveals that the differentially expressed genes (DEGs) are enriched primarily in fatty acid metabolism and mitochondrial fatty acid β-oxidation, which are closely related to ferroptosis. The experimental results show that the diabetic microenvironment induces ferroptosis both in vivo and in vitro. Western blot analysis reveals the decreased expressions of the antioxidant proteins GPX4, SLC7A11 and ferritin in the DCM group. However, qPCR demonstrates the elevated expressions of the ferroptosis markers PTGS2 and ACSL4. Biochemical indicators further support the occurrence of ferroptosis, with increased levels of malondialdehyde (MDA) and lactate dehydrogenase (LDH), along with decreased level of glutathione (GSH). In vitro, intervention with high glucose and palmitic acid in H9C2 cells results in ferroptosis, which is reversed by ferrostatin-1 (Fer-1). Results show the elevated expression of HMOX1 in DCM. Moreover, knockdown of HMOX1 ameliorates ferroptosis, thereby alleviating diabetic cardiomyopathy by reducing cardiac fibrosis and improving cardiac function. Our study elucidates the role of HMXO1 in DCM pathogenesis and provides a potential therapeutic strategy for clinical treatment.