The endogenous FGF21 level is a potential target for diagnosing NAFLD. This study aimed to assess the clinical utility of FGF21 in diagnosing NAFLD and provide new ideas for predicting and preventing NAFLD. A total of 193 patients diagnosed with NAFLD based on diagnostic criteria and 64 healthy individuals were included in the NAFLD and non-NAFLD groups, respectively. Data on the participant names, sex, age, height, weight, blood pressure, serum FGF21 levels, liver function enzyme (AST, ALT, ALP, and GGT) levels, lipid profile (TC, TG, HDL-C, and LDL-C) indicators, and blood glucose levels were collected. The data were statistically analyzed to assess the correlations between serum FGF21 levels and related biochemical markers in NAFLD patients. The areas under the receiver operating characteristic curves (AUCs) of serum FGF21, lipids (TG + TC + HDL + LDL), and FGF21 combined with lipids for the diagnosis of NAFLD were compared. Compared with the non-NAFLD group, the NAFLD group presented significantly higher levels of FGF21. Serum FGF21 levels in the NAFLD group were positively correlated with the TG, TC, and LDL-C levels (P < 0.05). The area under the receiver operating characteristic curve (AUC) of serum FGF21 for the diagnosis of NAFLD was 0.832 (95% CI: 0.77–0.886, P < 0.001). The AUC of FGF21 combined with lipids (TG + TC + HDL + LDL) for the diagnosis of NAFLD was 0.910 (95% CI: 0.874–0.946, P < 0.001). There is a close association between elevated FGF21 levels and the development of NAFLD. The progression of NAFLD is complex and varied, and its pathogenesis is unclear. Early detection, prevention, and intervention may help slow NAFLD development or even reverse the disease. In this study, we found that the FGF21 level could be used as an auxiliary biological indicator for predicting NAFLD, and the role of FGF21 in the progression of NAFLD deserves to be investigated in the future.