Mediation analysis indicated that genetically predicted IL-18 levels partially mediated the impact of MDD on female infertility associated with cervical, vaginal, other or unspecified origin, accounting for up to 14.61% of this effect. The gene discussed is IL18; the disease is female infertility.