Neuropsychological impairments are common in children with drug-resistant epilepsy. It has been proposed that epilepsy surgery might alleviate these impairments by providing seizure freedom; however, findings from prior studies have been inconsistent. We mapped long-term neuropsychological trajectories in children before and after undergoing epilepsy surgery, to measure the impact of disease course and surgery on functioning. We performed a retrospective cohort study of 882 children who had undergone epilepsy surgery at Great Ormond Street Hospital (1990-2018). We extracted patient information and neuropsychological functioning [obtained from IQ tests (domains: full-scale IQ, verbal IQ, performance IQ, working memory and processing speed) and tests of academic attainment (reading, spelling and numeracy)] and investigated changes in functioning using regression analyses. We identified 500 children (248 females) who had undergone epilepsy surgery [median age at surgery = 11.9 years, interquartile range = (7.8, 15.0)] and neuropsychological assessment. These children showed declines in all domains of neuropsychological functioning in the time leading up to surgery (all P-values â€0.001; e.g. ÎČFSIQ = -1.9, SEFSIQ = 0.3, PFSIQ < 0.001). Children lost on average one to four points per year, depending on the domain considered; 27%-43% declined by â„10 points from their first to their last preoperative assessment. At the time of presurgical evaluation, most children (46%-60%) scored one or more standard deviations below the mean (<85) on the different neuropsychological domains; 37% of these met the threshold for intellectual disability (full-scale IQ < 70). On a group level, there was no change in performance from pre- to postoperative assessment on any of the domains (all P-values â„0.128). However, children who became seizure free through surgery showed higher postoperative neuropsychological performance (e.g. rrb-FSIQ = 0.37, P < 0.001). These children continued to demonstrate improvements in neuropsychological functioning over the course of their long-term follow-up (e.g. ÎČFSIQ = 0.9, SEFSIQ = 0.3, PFSIQ = 0.004). Children who had discontinued antiseizure medication treatment at 1-year follow-up showed an 8- to 13-point advantage in postoperative working memory, processing speed and numeracy, and greater improvements in verbal IQ, working memory, reading and spelling (all P-values â€0.034) over the postoperative period compared with children who were seizure free and still receiving antiseizure medication. In conclusion, by providing seizure freedom and the opportunity for antiseizure medication cessation, epilepsy surgery might not only halt but reverse the downward trajectory that children with drug-resistant epilepsy display in neuropsychological functioning. To halt this decline as soon as possible or, potentially, to prevent it from occurring in the first place, children with focal epilepsy should be considered for epilepsy surgery as early as possible after diagnosis.