BackgroundMaternal infection during pregnancy may be a risk factor for epilepsy in offspring. Use of antibiotics is a valid marker of infection.Methodology/Principal FindingsTo examine the relationship between maternal infection during pregnancy and risk of childhood epilepsy we conducted a historical cohort study of singletons born in northern Denmark from 1998 through 2008 who survived ≥29 days. We used population-based medical databases to ascertain maternal use of antibiotics or hospital contacts with infection during pregnancy, as well as first-time hospital contacts with a diagnosis of epilepsy among offspring. We compared incidence rates (IR) of epilepsy among children of mothers with and without infection during pregnancy. We examined the outcome according to trimester of exposure, type of antibiotic, and total number of prescriptions, using Poisson regression to estimate incidence rate ratios (IRRs) while adjusting for covariates. Among 191 383 children in the cohort, 948 (0.5%) were hospitalised or had an outpatient visit for epilepsy during follow-up, yielding an IR of 91 per 100 000 person-years (PY). The five-year cumulative incidence of epilepsy was 4.5 per 1000 children. Among children exposed prenatally to maternal infection, the IR was 117 per 100 000 PY, with an adjusted IRR of 1.40 (95% confidence interval (CI): 1.22–1.61), compared with unexposed children. The association was unaffected by trimester of exposure, antibiotic type, or prescription count.Conclusions/SignificancePrenatal exposure to maternal infection is associated with an increased risk of epilepsy in childhood. The similarity of estimates across types of antibiotics suggests that processes common to all infections underlie this outcome, rather than specific pathogens or drugs.