BackgroundPrevious studies have suggested that psychiatric factors may be pathogenic for NAFLD. However, the association between depression and NAFLD is not been consistent, and whether depression plays a causal role in the development of NAFLD remains unclear. MethodsWe extracted data from the National Health and Nutrition Examination Survey (NHANES) 2017–2018 to assess the correlation between depression and NAFLD risk. Based on previous genome-wide association studies (GWAS) meta-analyses on NAFLD and depression, we performed a Mendelian randomization (MR) analysis to explore the causal effect of depression on NAFLD. The primary analysis method used in the MR analysis was inverse variance weighted. ResultsWe ultimately extracted the data from 3878 individuals in the NHANES database to perform the cross-sectional study. Multivariable-adjusted logistic regression showed that depressed individuals had a higher risk of NAFLD than controls (odds ratio [OR] 1.33, 95 % CI 1.03–1.72, p = 0.027) among women. Based on GWAS data, we included 36 genetic variants as instrumental variables to estimate the causal effect of depression on NAFLD risk. The MR analysis revealed a causal association between genetically predicted depression and an increased risk of NAFLD (OR = 1.504, 95 % CI 1.13–2.00, p = 0.005). LimitationsThe consistency of these findings in Eastern populations requires further longitudinal studies. ConclusionsThis cross-sectional study suggested that depression might increase the risk of NAFLD in women. The MR analysis demonstrated that there exists a causal association between genetically predicated depression and NAFLD risk.