ObjectiveConstructing a prediction model for seizures after stroke, and exploring the risk factors that lead to seizures after stroke. MethodsA retrospective analysis was conducted on 1 741 patients with stroke admitted to People's Hospital of Zhongjiang from July 2020 to September 2022 who met the inclusion and exclusion criteria. These patients were followed up for one year after the occurrence of stroke to observe whether they experienced seizures. Patient data such as gender, age, diagnosis, National Institute of Health Stroke Scale (NIHSS) score, Activity of daily living (ADL) score, laboratory tests, and imaging examination data were recorded. Taking the occurrence of seizures as the outcome, an analysis was conducted on the above data. The Least absolute shrinkage and selection operator (LASSO) regression analysis was used to screen predictive variables, and multivariate Logistic regression analysis was performed. Subsequently, the data were randomly divided into a training set and a validation set in a 7:3 ratio. Construct prediction model, calculate the C-index, draw nomogram, calibration plot, receiver operating characteristic (ROC) curve, and decision curve analysis (DCA) to evaluate the model's performance and clinical application value. ResultsThrough LASSO regression, nine non-zero coefficient predictive variables were identified: NIHSS score, homocysteine (Hcy), aspartate aminotransferase (AST), platelet count, hyperuricemia, hyponatremia, frontal lobe lesions, temporal lobe lesions, and pons lesions. Multivariate logistic regression analysis revealed that NIHSS score, Hcy, hyperuricemia, hyponatremia, and pons lesions were positively correlated with seizures after stroke, while AST and platelet count were negatively correlated with seizures after stroke. A nomogram for predicting seizures after stroke was established. The C-index of the training set and validation set were 0.854 [95%CI (0.841, 0.947)] and 0.838 [95%CI (0.800, 0.988)], respectively. The areas under the ROC curves were 0.842 [95%CI (0.777, 0.899)] and 0.829 [95%CI (0.694, 0.936)] respectively. Conclusion These nine variables can be used to predict seizures after stroke, and they provide new insights into its risk factors.