Our study was based on a large, community-based, middle-aged and elderly Chinese population, after multivariate fully adjusted, participants in the highest quartile of SHBG compared with those in the lowest quartile of SHBG had a significantly lower prevalence of NAFLD (OR, 0.19, 95% CI, 0.13–0.27 in females; OR, 0.42, 95% CI, 0.23–0.77 in males; both p <  0.05). The gene discussed is SHBG; the disease is metabolic dysfunction-associated steatotic liver disease.