Cognitive impairment is a frequent and serious problem in patients with various forms of severe mental illnesses (SMI), including schizophrenia (SZ) and bipolar disorder (BP). Recent research suggests genetic links to several cognitive phenotypes in both SMI and in the general population. Our goal in this study was to identify potential genomic signatures of cognitive functioning in veterans with severe mental illness and compare them to previous findings for cognition across different populations. Veterans Affairs (VA) Cooperative Studies Program (CSP) Study #572 evaluated cognitive and functional capacity measures among SZ and BP patients. In conjunction with the VA Million Veteran Program, 3,959 European American (1,095 SZ, 2,864 BP) and 2,601 African American (1,095 SZ, 2,864 BP) patients were genotyped using a custom Affymetrix Axiom Biobank array. We performed a genome‐wide association study of global cognitive functioning, constructed polygenic scores for SZ and cognition in the general population, and examined genetic correlations with 2,626 UK Biobank traits. Although no single locus attained genome‐wide significance, observed allelic effects were strongly consistent with previous studies. We observed robust associations between global cognitive functioning and polygenic scores for cognitive performance, intelligence, and SZ risk. We also identified significant genetic correlations with several cognition‐related traits in UK Biobank. In a diverse cohort of U.S. veterans with SZ or BP, we demonstrate broad overlap of common genetic effects on cognition in the general population, and find that greater polygenic loading for SZ risk is associated with poorer cognitive performance.