Objective The effect of mental disorders (MD) on cardiovascular disease (CVD) remains controversial, and this study aims to analyze the causal relationship between eight MD and CVD by Mendelian randomization (MR). Methods Single nucleotide polymorphisms of attention-deficit/hyperactivity disorder (ADHD), anorexia nervosa (AN), anxiety disorder (ANX), autism spectrum disorder (ASD), bipolar disorder (BD), depression, obsessive-compulsive disorder (OCD), schizophrenia (SCZ), and CVD were obtained from UK Biobank and FinnGen. Exposure-outcome causality was tested using inverse variance weighted (IVW), MR-Egger, and weighted median. Horizontal pleiotropy and heterogeneity were assessed by MR-Egger intercept and Cochran's Q, respectively, while stability of results was assessed by leave-one-out sensitivity analysis. Results MR analysis showed that ANX (IVW [odds ratio (OR) 1.11, 95% confidence intervals (CI) 1.07-1.15, p < 0.001]; MR-Egger [OR 1.03, 95% CI 0.92-1.14, p = 0.652]; weighted median [OR 1.09, 95% CI 1.03-1.14, p = 0.001]), ASD (IVW [OR 1.05, 95% CI 1.00-1.09, p = 0.039]; MR-Egger [OR 0.95, 95% CI 0.84-1.07, p = 0.411]; weighted median [OR 1.01, 95% CI 0.96-1.06, p = 0.805]), depression (IVW [OR 1.15, 95% CI 1.10-1.19, p < 0.001]; MR-Egger [OR 1.10, 95% CI 0.96-1.26, p = 0.169]; weighted median [OR 1.13, 95% CI 1.08-1.19, p < 0.001]) were significantly associated with increased risk of CVD, whereas ADHD, AN, BD, OCD, and SCZ were not significantly associated with CVD (p > 0.05). Intercept analysis showed no horizontal pleiotropy (p > 0.05). Cochran's Q showed no heterogeneity except for BD (p = 0.035). Sensitivity analysis suggested that these results were robust. Conclusions ANX, ASD, and depression are associated with an increased risk of CVD, whereas AN, ADHD, BD, OCD, and SCZ are not causally associated with CVD. Active prevention and treatment of ANX, ASD, and depression may help reduce the risk of CVD.