The causal effects of mental health problems on the risk of infectious diseases remain vague. Investigating them via observational study is challenging as it presents possible confounding factors. Therefore, the objective of this study was to utilize Mendelian randomization (MR) techniques to evaluate the causal relationship between mental health problems and the risk of infectious diseases. Multivariable MR analyses were performed using genome-wide association data for sleep disorders (N = 216,700), depression (N = 500,199), anxiety (N = 290,361), nervous feelings (N = 450,700), unspecified mental disorder (N = 218,792), pneumonia (N = 486,484), skin and subcutaneous tissue infection (SSTI; N = 218,792), intestinal infectious diseases (IIDs; N = 218,792), urinary tract infection (N = 463,010), and central nervous system (CNS) infections (N = 218,792) among individuals of European ancestry. Independent genetic variants significantly (P < 10-8) associated with each exposure were considered instruments. The primary analysis used an inverse variance-weighted method, followed by a series of sensitivity analyses. Genetically predicted sleep disorders were associated with an increased risk of SSTI (odds ratio [OR], 1.29 [95% confidence interval (CI), 1.05-1.59]; P = .017). Genetically predicted depression was linked with an increased risk of CNS infections (OR, 1.59 [95% CI, 1.00-2.53]; P = .049) and SSTI (1.24 [95% CI, 1.03-1.49]; P = .024). Genetically predicted anxiety was associated with IIDs (OR, 1.19 [95% CI, 1.03-1.37]; P = .017) and SSTI (OR, 1.21 [95% CI, 1.02-1.43]; P = .029). There was no significant causal evidence for genetic prediction of nervous feelings and unspecified mental disorders in IIDs, CNS infections, SSTI, pneumonia, or urinary tract infection. Sensitivity analyses showed that the above causal association estimates were robust. In this MR study, we demonstrated a causal relationship between sleep disorders, depression, anxiety, and the risk of infectious diseases. However, no evidence was found to support causality between nervous feelings, unspecified mental disorders, and the risk of infectious diseases.