Migraine affects over a billion individuals worldwide but its genetic underpinning remains largely unknown. Here, we performed a genome-wide association study of 102,084 migraine cases and 771,257 controls and identified 123 loci, of which 86 are previously unknown. These loci provide an opportunity to evaluate shared and distinct genetic components in the two main migraine subtypes: migraine with aura and migraine without aura. Stratification of the risk loci using 29,679 cases with subtype information indicated three risk variants that seem specific for migraine with aura (in HMOX2, CACNA1A and MPPED2), two that seem specific for migraine without aura (near SPINK2 and near FECH) and nine that increase susceptibility for migraine regardless of subtype. The new risk loci include genes encoding recent migraine-specific drug targets, namely calcitonin gene-related peptide (CALCA/CALCB) and serotonin 1F receptor (HTR1F). Overall, genomic annotations among migraine-associated variants were enriched in both vascular and central nervous system tissue/cell types, supporting unequivocally that neurovascular mechanisms underlie migraine pathophysiology.