We sought to estimate the risk of seizure-related events associated with refilling prescriptions for antiepileptic drugs (AEDs) and to estimate the effect of switching between brand-name and generic drugs or between two generic versions of the same drug. We conducted a case-crossover study using health-care databases from British Columbia, Canada, among AED users who had an emergency room visit or hospitalization for seizure (index seizure-related event), defined using International Classification of Diseases, Ninth Revision, Clinical Modification (ICD-9) codes 345.xx (epilepsy and recurrent seizures) and 780.3x (convulsions), between 1997 and 2005. AED prescription refilling itself was associated with 2.3-fold elevated odds of seizure-related events when the refill occurred within 21 days before the index event (odds ratio (OR) 2.31; 95% confidence interval (CI) 1.56-3.44). The OR was 2.75 (95% CI 0.88-8.64) for refills that involved switching, yielding a refill-adjusted OR for switching of 1.19 (95% CI 0.35-3.99). Refilling the same AED prescription was associated with an elevated risk of seizure-related events whether or not the refill involved switching from a brand-name to a generic product.