Abstract Myasthenia gravis (MG) is a rare autoantibody-mediated disease affecting the neuromuscular junction. We performed a genome-wide association study of 5708 MG cases and 432,028 controls of European ancestry and a replication study in 3989 cases and 226,643 controls provided by 23andMe Inc. We identified 12 independent genome-wide significant hits ( P < 5e −8 ) across 11 loci. Subgroup analyses revealed two of these were associated with early-onset (at age <50) and four with late-onset MG (at age ≥ 50). Imputation of human leukocyte antigen alleles revealed inverse effect sizes for late- and early-onset, suggesting a potential modulatory influence on the time of disease manifestation. We assessed the performance of polygenic risk scores for MG, which significantly predicted disease status in an independent target cohort, explaining 4.21% of the phenotypic variation ( P = 5.12e −9 ). With this work, we aim to enhance our understanding of the genetic architecture of MG.