We carried out a genome-wide association study of IgA nephropathy, a major cause of kidney failure worldwide. We studied 1,194 cases and 902 controls of Chinese Han ancestry, with targeted follow up in Chinese and European cohorts comprising 1,950 cases and 1,920 controls. We identified three independent loci in the major histocompatibility complex, as well as a common deletion of CFHR1 and CFHR3 at chromosome 1q32 and a locus at chromosome 22q12 that each surpassed genome-wide significance (P values for association between 1.59 × 10⁻²⁶ and 4.84 × 10⁻⁹ and minor allele odds ratios of 0.63-0.80). These five loci explain 4-7% of the disease variance and up to a tenfold variation in interindividual risk. Many of the alleles that protect against IgA nephropathy impart increased risk for other autoimmune or infectious diseases, and IgA nephropathy risk allele frequencies closely parallel the variation in disease prevalence among Asian, European and African populations, suggesting complex selective pressures.