To elucidate the genetic underpinnings of the antidepressant efficacy of S-ketamine (esketamine) nasal spray in major depressive disorder (MDD), we performed a genome-wide association study (GWAS) in cohorts of European ancestry (n = 527). This analysis was followed by a polygenic risk score approach to test for associations between genetic loading for psychiatric conditions, symptom profiles and esketamine efficacy. We identified a genome-wide significant locus in IRAK3 (p = 3.57 × 10-8, rs11465988, β = - 51.6, SE = 9.2) and a genome-wide significant gene-level association in NME7 (p = 1.73 × 10-6) for esketamine efficacy (i.e. percentage change in symptom severity score compared to baseline). Additionally, the strongest association with esketamine efficacy identified in the polygenic score analysis was from the genetic loading for depressive symptoms (p = 0.001, standardized coefficient β = - 3.1, SE = 0.9), which did not reach study-wide significance. Pathways relevant to neuronal and synaptic function, immune signaling, and glucocorticoid receptor/stress response showed enrichment among the suggestive GWAS signals.