Body mass index (BMI) is associated with fatty liver risk, however, the dose-response relationship between continuous BMI changes and fatty liver risk has not been clearly defined. In this study, a cross-sectional study was conducted and a total of 3202 individuals were included. Unconditional logistic regression and restricted cubic spline model were used to analyze the dose-response association of BMI with fatty liver risk. After adjusting for confounding factors (age, gender, hypertension, total cholesterol, triglycerides, glucose, high-density lipoprotein, low-density lipoprotein, uric acid, homocysteine, creatinine, aspartate aminotransferase and alanine transaminase), overweight (OR = 3.55, 95% CI: 2.49–5.06, P = 2.79 × 10−12), obesity (OR = 7.59, 95% CI: 4.91–11.71, P = 6.56 × 10−20) were significantly related to fatty liver risk. Stratified by gender (male/female), age (<50 years/≥50 years), prevalence of hypertension (yes/no), the above association was still significant (P = 0.004 or lower). In dose-response analysis, BMI was statistically significantly associated with fatty liver risk in a nonlinear fashion (approximately J-shaped fashion, Pnonlinearity = 1.71 × 10−4 or lower) in the total population and all subgroups mentioned above. Findings from this dose-response analysis suggest that higher BMI (overweight/obesity) is an independent, dose-dependent risk factor for fatty liver, and prevention of fatty liver focusing on continuous changes in BMI should be noted.