PURPOSECognitive impairment is prevalent among individuals with epilepsy, and increasing evidence indicates that genetic factors can underlie this relationship. However, the extent to which epilepsy subtypes differ in their genetic relationship with cognitive function, and information about the specific genetic variants involved remain largely unknown.METHODSWe investigated the genetic relationship between epilepsies and general cognitive ability (COG) using complementary statistical tools, including linkage disequilibrium score (LDSC) regression, MiXeR and conjunctional false discovery rate (conjFDR). We analyzed genome-wide association study data on COG (n = 269,867) and common epilepsies (n = 27,559 cases, 42,436 controls), including the broad phenotypes 'all epilepsy', focal epilepsies and genetic generalized epilepsies (GGE), as well as specific subtypes. We functionally annotated the identified loci using several biological resources and validated the results in independent samples.RESULTSUsing MiXeR, COG (11.2k variants) was estimated to be almost four times more polygenic than 'all epilepsy', GGE, juvenile myoclonic epilepsy (JME), and childhood absence epilepsy (CAE) (2.5k - 2.9k variants). The other epilepsy phenotypes were insufficiently powered for MiXeR analysis. We quantified extensive genetic overlap between COG and epilepsy types, but with varying negative genetic correlations (-0.23 to -0.04). COG was estimated to share 2.9k variants with both GGE and 'all epilepsy', and 2.3k variants with both JME and CAE. Using conjFDR, we identified 66 distinct loci shared between COG and epilepsies, including novel associations for GGE (27), 'all epilepsy' (5), JME (5) and CAE (5). The implicated genes were significantly expressed in multiple brain regions. The results were validated in independent samples (COG: p = 3.62 × 10-7; 'all epilepsy': p = 2.58 × 10-3).CONCLUSIONOur study further dissects the substantial genetic basis shared between epilepsies and COG and identifies novel shared loci. An improved understanding of the genetic relationship between epilepsies and COG may lead to the development of novel comorbidity-targeted epilepsy treatments.