Primary aldosteronism affects up to 10% of hypertensive patients and is responsible for treatment resistance and increased cardiovascular risk. Here we perform a genome-wide association study in a discovery cohort of 562 cases and 950 controls and identify three main loci on chromosomes 1, 13 and X; associations on chromosome 1 and 13 are replicated in a second cohort and confirmed by a meta-analysis involving 1162 cases and 3296 controls. The association on chromosome 13 is specific to men and stronger in bilateral adrenal hyperplasia than aldosterone producing adenoma. Candidate genes located within the two loci, CASZ1 and RXFP2, are expressed in human and mouse adrenals in different cell clusters. Their overexpression in adrenocortical cells suppresses mineralocorticoid output under basal and stimulated conditions, without affecting cortisol biosynthesis. Our study identifies the first risk loci for primary aldosteronism and highlights new mechanisms for the development of aldosterone excess.