Our findings indicate that the higher pro-inflammatory potential of diet is associated with a higher risk of depression and anxiety, and this association may be mediated by CRP for depression and anxiety, WC, and BMI-z score for only depression. Here, CRP is linked to major depressive disorder.