Bipolar disorder (BD) and schizophrenia (SZ) are associated with higher odds of suicide attempt (SA). In this study, we aimed to explore the effect of BD and SZ genetic liabilities on SA, also considering the contribution of behavioral traits, socioeconomic factors, and substance use disorders. Leveraging large-scale genome-wide association data from the Psychiatric Genomics Consortium (PGC) and the UK Biobank (UKB), we conducted a two-sample Mendelian randomization (MR) analysis to evaluate the putative causal effect of BD (41,917 cases, 371,549 controls) and SZ (53,386 cases, 77,258 controls) on SA (26,590 cases, 492,022 controls). Then, we assessed the putative causal effect of BD and SZ on behavioral traits, socioeconomic factors, and substance use disorders. Considering the associations identified, we evaluated the direct causal effect of behavioral traits, socioeconomic factors, and substance use disorders on SA using a multivariable MR approach. The genetic liabilities to BD and SZ were associated with higher odds of SA (BD odds ratio (OR) = 1.24, p = 3.88 × 10-12; SZ OR = 1.09, p = 2.44 × 10-20). However, while the effect of mental distress (OR = 1.17, p = 1.02 × 10-4) and risk-taking (OR = 1.52, p = 0.028) on SA was independent of SZ genetic liability, the BD-SA relationship appeared to account for the effect of these risk factors. Similarly, the association with loneliness on SA was null after accounting for the effect of SZ genetic liability. These findings highlight the complex interplay between genetic risk of psychiatric disorders and behavioral traits in the context of SA, suggesting the need for a comprehensive mental health assessment for high-risk individuals.