The associations of MTHFR rs17367504 and exercise with MDD risk were estimated using logistic regression models. Here, MTHFR is linked to major depressive disorder.