Previous studies have shown that fibroblast growth factor 21 (FGF21) is involved in the ventricular remodeling process in heart failure with preserved ejection fraction (HFpEF). We hypothesized that high levels of FGF21 correlated with the ventricular remodeling of heart failure patients with mildly reduced (HFmrEF) and reduced ejection fraction (HFrEF). A total of 203 participants with HFmrEF or HFrEF were enrolled and followed up from June 2018 to June 2021. 68 subjects without heart failure (HF) underwent physical examinations during the same time were selected as the control group. The primary endpoint was the occurrence of major adverse cardiovascular events (MACEs), which were defined as all-cause or cardiac mortality and rehospitalization for decompensation. Serum FGF21 levels were measured early the next morning after admission using enzyme-linked immunosorbent assay (ELISA). The FGF21 levels were significantly higher in patients with HFmrEF or HFrEF than that in the control group (213.57 ± 42.65pg/mL, 222.93 ± 34.36pg/mL vs 171.00 ± 12.86pg/mL, p < .001). The serum levels of FGF21 and N-terminal pro-B-type natriuretic peptide (NT-proBNP) were both higher in the endpoint event group than those of non-endpoint event group regardless of the HFmrEF or HFrEF group (p < .001). Spearman's correlation revealed that FGF21 was positively correlated with left ventricular end-systolic diameter left ventricular end-diastolic diameter left ventricular mass index (p < .01). Moreover, there was a negative correlation between FGF21 and left ventricular ejection fraction in addition to relative wall thickness (p < .001). The area under the receiver operating characteristic (ROC) curve (AUC) of FGF21 was 0.874. The optimal cut-off value of FGF21 determined by ROC curve was 210.11pg/mL. The Kaplan-Meier analysis demonstrated that the low FGF21 levels group had an increased MACE-free survival rate compared with the high FGF21 levels group. On univariate and multivariate Cox analysis, it was seen that both serum FGF21 and NT-proBNP were independent predictors of a poor prognosis in HF patients. Baseline levels of FGF21 and NT-proBNP were related to the ventricular remodeling of patients with a mildly reduced or reduced ejection fraction. FGF21 and NT-proBNP both had good prognostic value for MACEs in heart failure patients with a mildly reduced and reduced ejection fraction.