Background:Genetic and environmental factors contribute to migraine and the comorbidities of anxiety and depression. However, the association between genetic polymorphisms in the transient receptor potential (TRP) channels and glutamatergic synapse genes with the risk of migraine and the comorbidities of anxiety and depression remain unclear.Methods:251 migraine patients containing 49 comorbidities with anxiety and 112 with depression and 600 controls were recruited. A customized 48-plex SNPscan kit was used for genotyping 13 SNPs of nine target genes. Logistic regression was conducted to analyze these SNPs’ association with the susceptibility of migraine and comorbidities. The generalized multifactor dimension reduction (GMDR) was applied to analyze the SNP-SNP and gene-environment interactions. The GTEx database was used to examine the effects of the significant SNPs on gene expressions.Results:TheTRPV1rs8065080 andTRPV3rs7217270 were associated with an increased risk of migraine in the dominant model [ORadj(95% CI): 1.75 (1.09–2.90),p= 0.025; 1.63 (1.02–2.58),p= 0.039, respectively].GRIK2rs2227283 was associated with migraine in the edge of significance [ORadj(95% CI) = 1.36 (0.99–1.89),p= 0.062]. In migraine patients,TRPV1rs222741 was associated with both anxiety risk and depression risk in the recessive model [ORadj(95% CI): 2.64 (1.24–5.73),p= 0.012; 1.97 (1.02–3.85),p= 0.046, respectively].TRPM8rs7577262 was associated with anxiety (ORadj= 0.27, 95% CI = 0.10–0.76,p= 0.011).TRPV4rs3742037,TRPM8rs17862920 andSLC17A8rs11110359 were associated with depression in dominant model [ORadj(95% CI): 2.03 (1.06–3.96),p= 0.035; 0.48 (0.23–0.96),p= 0.042; 0.42 (0.20–0.84),p= 0.016, respectively]. Significant eQTL and sQTL signals were observed for SNP rs8065080. Individuals with GRS (Genetic risk scores) of Q4 (14–17) had a higher risk of migraine and a lower risk of comorbidity anxiety than those with Genetic risk scores scores of Q1 (0–9) groups [ORadj(95% CI): 2.31 (1.39–3.86),p= 0.001; 0.28 (0.08–0.88),p= 0.034, respectively].Conclusion:This study suggests thatTRPV1rs8065080,TRPV3rs7217270, andGRIK2rs2227283 polymorphism may associate with migraine risk.TRPV1rs222741 andTRPM8rs7577262 may associate with migraine comorbidity anxiety risk. rs222741, rs3742037, rs17862920, and rs11110359 may associate with migraine comorbidity depression risk. Higher GRS scores may increase migraine risk and decrease comorbidity anxiety risk.