Emerging reports of rare neurological complications associated with COVID-19 infection and vaccinations are leading to regulatory, clinical and public health concerns. We undertook a self-controlled case series study to investigate hospital admissions from neurological complications in the 28 days after a first dose of ChAdOx1nCoV-19 (n = 20,417,752) or BNT162b2 (n = 12,134,782), and after a SARS-CoV-2-positive test (n = 2,005,280). There was an increased risk of Guillain-Barré syndrome (incidence rate ratio (IRR), 2.90; 95% confidence interval (CI): 2.15-3.92 at 15-21 days after vaccination) and Bell's palsy (IRR, 1.29; 95% CI: 1.08-1.56 at 15-21 days) with ChAdOx1nCoV-19. There was an increased risk of hemorrhagic stroke (IRR, 1.38; 95% CI: 1.12-1.71 at 15-21 days) with BNT162b2. An independent Scottish cohort provided further support for the association between ChAdOx1nCoV and Guillain-Barré syndrome (IRR, 2.32; 95% CI: 1.08-5.02 at 1-28 days). There was a substantially higher risk of all neurological outcomes in the 28 days after a positive SARS-CoV-2 test including Guillain-Barré syndrome (IRR, 5.25; 95% CI: 3.00-9.18). Overall, we estimated 38 excess cases of Guillain-Barré syndrome per 10 million people receiving ChAdOx1nCoV-19 and 145 excess cases per 10 million people after a positive SARS-CoV-2 test. In summary, although we find an increased risk of neurological complications in those who received COVID-19 vaccines, the risk of these complications is greater following a positive SARS-CoV-2 test.