Objective We aimed to investigate the effect of a code stroke system on the development of poststroke epilepsy. Methods We retrospectively analyzed consecutive patients treated with IV thrombolysis under or outside the code stroke system between 2003 and 2012. Patients were followed up for at least 2 years or until death. Factors with p < 0.1 in univariate comparisons were selected for multivariable logistic and Cox regression. Results A total of 409 patients met the eligibility criteria. Their median age at stroke onset was 75 years (interquartile range 64-83 years); 220 (53.8%) were male. The median follow-up duration was 1,074 days (interquartile range 119-1,671 days). Thirty-two patients (7.8%) had poststroke seizures during follow-up, comprising 7 (1.7%) with acute symptomatic seizures and 25 (6.1%) with late-onset seizures. Twenty-six patients (6.4%) fulfilled the definition of poststroke epilepsy. Three hundred eighteen patients (77.8%) were treated with the code stroke system while 91 (22.2%) were not. After adjustment for age and stroke etiology, use of the code stroke system was associated with decreased odds of poststroke epilepsy (odds ratio = 0.36, 95% confidence interval 0.14-0.87, p = 0.024). Cox regression showed lower adjusted hazard rates for poststroke epilepsy within 5 years for patients managed under the code stroke system (hazard ratio = 0.60, 95% confidence interval 0.47-0.79, p < 0.001). Conclusion The code stroke system was associated with reduced odds and instantaneous risk of poststroke epilepsy. Further studies are required to identify the contribution of the individual components and mechanisms against epileptogenesis after stroke. Classification of evidence This study provides Class III evidence that for people with acute ischemic stroke, implementation of a code stroke system reduces the risk of poststroke epilepsy.