Abstract Background This study investigated the relationship between fibroblast growth factor 21 (FGF-21) and newly diagnosed type-2 diabetes mellitus (T2DM). Methods In this cross-sectional study, FGF-21 and T2DM risk were analyzed using restricted cubic splines with univariate or multivariate logistic regression analysis. Odds ratios (ORs) and 95% confidence intervals (CIs) were calculated via logistic regression analysis. Cluster and subgroup analyses were conducted to evaluate the associations between FGF-21 and diabetes in different subpopulations. Nomograms and ROC curves were used to explore the clinical utility of FGF-21 in the diabetes assessment model. Results High levels of FGF-21 were significantly associated with a high risk of T2DM after adjusting for confounding factors in both the total population and subpopulations (P for trend