BackgroundLifestyle intervention can effectively treat patients with non-alcoholic fatty liver disease (NAFLD). The present study aimed to investigate the association between lifestyle factors with fatty liver index (FLI) in Iranian adults.MethodsThis study enrolled 7114 subjects from the Ravansar Non-Communicable Diseases (RaNCD) cohort study in western Iran. To compute the FLI score, anthropometric measures, and a few non-invasive liver status indicators were used. Binary logistic regression models examined the association between FLI score and lifestyle.ResultsParticipants with FLI < 60 had a lower daily energy intake compared to those with FLI ≥ 60 (2740.29 vs. 2840.33 kcal/day, P = < 0.001). The risk of NAFLD in males with high socioeconomic status (SES) was 72% higher than in those with low SES (OR: 1.72; 95% CIs 1.42–2.08). An adjusted logistic regression model showed a significantly negative association between high physical activity and fatty liver index in both men and women. (OR: 0.44, p-value < 0.001 and OR: 0.54, p-value < 0.001, respectively). The odds of NAFLD in female participants with depression were 71% higher than in non-depressed participants (OR: 1.71, 95% CI: 1.06–2.64). Dyslipidemia and high visceral fat area (VFA) were also associated with a significant increase in the risk of NAFLD (P < 0.05).ConclusionIn our study, we found that good SES, high VFA, and dyslipidemia were associated with an increased risk of NAFLD. Conversely, high physical activity reduces the risk of NAFLD. Therefore, lifestyle modification may help improve liver function.