Background The effects of depression on liver function remain unclear. This study aims to assess the impact of depression on liver function based on the NHANES 2017-2020 data analysis and two-sample Mendelian randomization analysis. And employ mediation analysis to evaluate the mediating roles of BMI, alcohol consumption and prescription drug use.Methods Using the NHANES 2017-2020 data, linear regression and logistic regression were employed to identify the association between depression and liver function based on different variable types. Then, restricted cubic spline analysis (RCS) was used to determine whether there was a non-linear association. Subsequently, mediation analysis was conducted to clarify the mediating roles of BMI, alcohol consumption, and the application of prescription drugs in this association. Finally, Mendelian randomization (MR) analysis was used to evaluate the causal relationship of this association.Results Depression was associated with increased ALP and GGT levels, and decreased TBIL levels, with a significant non-linear relationship. Further, body mass index (BMI), alcohol consumption, and prescription drug use mediated the relationship between depression and liver function. Lastly, two-sample MR analysis provides preliminary support for a potential causal effect of depression on liver indicators: it suggests depression may contribute to increase ALP (odds ratio OR = 1.044, 95% confidence interval CI: 1.001–1.088, p = 0.047) and GGT (OR = 1.074, 95%CI: 1.030–1.120, p < 0.001), and reduce TBIL (OR = 0.930, 95%CI: 0.902–0.958, p < 0.001).Limitations Cross-sectional NHANES may introduce reverse causality bias; Participant exclusion and unmeasured confounders could distort association estimates; The definition of some mixed factors is not detailed enough; MR’s European ancestry data limits generalizability.Conclusion Depression was positively correlated with ALP and GGT levels, and negatively correlated with TBIL levels, with a causal link. Factors such as BMI, alcohol consumption, and prescription drug use serve as mediators of this relationship. These findings highlighted the significant effects of depression on liver function. Future studies should validate our findings in multi-ethnic cohorts and explore the direct mechanism of depression-induced TBIL reduction.
Wang et al. (2026) studied this question.