Epilepsy is highly heritable, with numerous known genetic risk loci. However, the genetic predisposition's role in poststroke epilepsy (PSE) remains understudied. This study assesses whether a higher genetic predisposition to epilepsy raises poststroke survivor's risk of PSE. We conducted a case-control genetic association study nested within the UK Biobank, a large UK-based prospective cohort. Our exposures of interest were 2 distinct polygenic risk scores-generalized and focal epilepsy-modeled as deciles and constructed using genetic variants identified in the latest International League Against Epilepsy genome-wide association study meta-analysis. We aimed to evaluate the association between these polygenic risk scores and their corresponding subtype of PSE-generalized and focal. In sensitivity analyses, we evaluated participants of European ancestry separately and considered focal and generalized epilepsy outcomes in participants without a history of stroke. In secondary analyses, we evaluated the polygenic risk of PSE by stroke subtype (ischemic, hemorrhagic, or any stroke). Multivariable logistic regression models were fitted, adjusting for age, sex, genetic ancestry, and the first 5 principal genetic components. Among 17 549 UK Biobank stroke survivors with available genetic information (mean age, 61; 43% female), 185 (1%) developed generalized PSE, while 124 (0.7%) developed focal PSE. Multivariable logistic regression results showed that, when compared against the lowest decile, participants within the highest PRS decile for generalized PSE had 5-fold higher odds of developing generalized PSE (OR, 5.05 [95% CI, 2.37-12.5]; P trend<0.001). Similarly, when compared against the lowest decile, participants within the highest polygenic risk score decile for focal PSE had 3-fold higher odds of developing focal PSE (OR, 3.20; [5% CI, 1.25-9.82]; P trend=0.024). Sensitivity analyses among participants of European ancestry yielded similar results. Our findings suggest that, like other forms of epilepsy, genetic predisposition plays an essential role in PSE. These results underscore the need for future studies to elucidate the mechanisms underlying PSE development and to identify novel therapeutic avenues.