To identify pan-ancestry and ancestry-specific loci associated with attempting suicide among veterans, we conducted a genome-wide association study (GWAS) of suicide attempts within a large, multi-ancestry cohort of U.S. veterans enrolled in the Million Veterans Program (MVP). Cases were defined as veterans with a documented history of suicide attempts in the electronic health record (EHR; N = 14,089) and controls were defined as veterans with no documented history of suicidal thoughts or behaviors in the EHR (N = 395,064). GWAS was performed separately in each ancestry group, controlling for sex, age and genetic substructure. Pan-ancestry risk loci were identified through meta-analysis and included two genome-wide significant loci on chromosomes 20 (p = 3.64 × 10−9) and 1 (p = 3.69 × 10−8). A strong pan-ancestry signal at the Dopamine Receptor D2 locus (p = 1.77 × 10−7) was also identified and subsequently replicated in a large, independent international civilian cohort (p = 7.97 × 10−4). Additionally, ancestry-specific genome-wide significant loci were also detected in African-Americans, European-Americans, Asian-Americans, and Hispanic-Americans. Pathway analyses suggested over-representation of many biological pathways with high clinical significance, including oxytocin signaling, glutamatergic synapse, cortisol synthesis and secretion, dopaminergic synapse, and circadian rhythm. These findings confirm that the genetic architecture underlying suicide attempt risk is complex and includes both pan-ancestry and ancestry-specific risk loci. Moreover, pathway analyses suggested many commonly impacted biological pathways that could inform development of improved therapeutics for suicide prevention.