Noncardiac comorbidities such as diabetes mellitus (DM) have different outcomes in heart failure with preserved ejection fraction (HFpEF) compared with heart failure with reduced ejection fraction (HFrEF). These different outcomes are the result of distinct myocardial effects of DM on HFpEF and HFrEF, which relate to different mechanisms driving myocardial remodeling in each heart failure phenotype. Myocardial remodeling is driven by microvascular endothelial inflammation in HFpEF and by cardiomyocyte cell death in HFrEF. Evidence consists of: different biomarker profiles, in which inflammatory markers are prominent in HFpEF and markers of myocardial injury or wall stress are prominent in HFrEF; reduced coronary flow reserve with microvascular rarefaction in HFpEF; and upregulation of free radical-producing enzymes in endothelial cells in HFpEF and in cardiomyocytes in HFrEF. As biopsies from patients with diabetic cardiomyopathy reveal, DM affects failing myocardium by phenotype-specific mechanisms. In HFpEF, DM mainly increases cardiomyocyte hypertrophy and stiffness, probably because of hyperinsulinemia and microvascular endothelial inflammation. In HFrEF, DM augments replacement fibrosis because of cardiomyocyte cell death induced by lipotoxicity or advanced glycation end products. Because DM exerts distinct effects on myocardial remodeling in HFpEF and HFrEF, the heart failure phenotype is important for DM therapy.