Background: Restless legs syndrome is a highly prevalent comorbidity of migraine; however, its genetic contributions remain unclear. Objectives: To identify the genetic variants of restless legs syndrome in migraineurs and to investigate their potential pathogenic roles. Methods: We conducted a two-stage genome-wide association study (GWAS) to identify susceptible genes for restless legs syndrome in 1,647 patients with migraine, including 264 with and 1,383 without restless legs syndrome, and also validated the association of lead variants in normal controls unaffected with restless legs syndrome (n = 1,053). We used morpholino translational knockdown (morphants), CRISPR/dCas9 transcriptional knockdown, transient CRISPR/Cas9 knockout (crispants) and gene rescue in one-cell stage embryos of zebrafish to study the function of the identified genes. Results: We identified two novel susceptibility loci rs6021854 (in VSTM2L) and rs79823654 (in CCDC141) to be associated with restless legs syndrome in migraineurs, which remained significant when compared to normal controls. Two different morpholinos targeting vstm2l and ccdc141 in zebrafish demonstrated behavioural and cytochemical phenotypes relevant to restless legs syndrome, including hyperkinetic movements of pectoral fins and decreased number in dopaminergic amacrine cells. These phenotypes could be partially reversed with gene rescue, suggesting the specificity of translational knockdown. Transcriptional CRISPR/dCas9 knockdown and transient CRISPR/Cas9 knockout of vstm2l and ccdc141 replicated the findings observed in translationally knocked-down morphants. Conclusions: Our GWAS and functional analysis suggest VSTM2L and CCDC141 are highly relevant to the pathogenesis of restless legs syndrome in migraineurs.