The etiology of substance use disorders (SUDs) and psychiatric disorders reflects a combination of both transdiagnostic (i.e., common) and disorder-level (i.e., independent) genetic risk factors. We applied genomic structural equation modeling to examine these genetic factors across SUDs, psychotic, mood, and anxiety disorders using genome-wide association studies (GWAS) of European-(EUR) and African-ancestry (AFR) individuals. In EUR individuals, transdiagnostic genetic factors represented SUDs (143 lead single nucleotide polymorphisms [SNPs]), psychotic (162 lead SNPs), and mood/anxiety disorders (112 lead SNPs). We identified two novel SNPs for mood/anxiety disorders that have probable regulatory roles onFOXP1,NECTIN3, andBTLAgenes. In AFR individuals, genetic factors represented SUDs (1 lead SNP) and psychiatric disorders (no significant SNPs). The SUD factor lead SNP, although previously significant in EUR- and cross-ancestry GWAS, is a novel finding in AFR individuals. Shared genetic variance accounted for overlap between SUDs and their psychiatric comorbidities, with second-order GWAS identifying up to 12 SNPs not significantly associated with either first-order factor in EUR individuals. Finally, common and independent genetic effects showed different associations with psychiatric, sociodemographic, and medical phenotypes. For example, the independent components of schizophrenia and bipolar disorder had distinct associations with affective and risk-taking behaviors, and phenome-wide association studies identified medical conditions associated with tobacco use disorder independent of the broader SUDs factor. Thus, combining transdiagnostic and disorder-level genetic approaches can improve our understanding of co-occurring conditions and increase the specificity of genetic discovery, which is critical for psychiatric disorders that demonstrate considerable symptom and etiological overlap.