Existing data regarding the link between COVID-19 vaccine and myasthenia gravis (MG) are scarce. We aimed to assess the association between Pfizer-BioNTech vaccine with both new-onset MG and MG exacerbation. For the first aim, we conducted a nested case-control study in a cohort of 3,052,467 adults, without a diagnosis of MG, from the largest healthcare provider in Israel. Subjects were followed from January 1, 2021 until June 30, 2022 for the occurrence of MG. Ten randomly selected controls were matched to each case of new-onset MG on age and sex. For the second aim, a nested case-control study was conducted in a cohort of 1446 MG patients. Four randomly selected MG patients (controls) were matched to each case of MG exacerbation. Exposure to COVID-19 vaccine in the prior 4 weeks was assessed in cases and controls. Overall, 332 patients had new-onset MG and were matched with 3320 controls. Multivariable conditional logistic regression models showed that the odds ratio (OR) for new-onset MG, associated with COVID-19 vaccine, was 1.14 (95% CI 0.73-1.78). The results were consistent in sensitivity analysis that used more stringent criteria to define MG. Overall, 62 patients with MG exacerbation were matched to 248 MG controls. The multivariable OR for MG exacerbation, associated with COVID-19 vaccine, was 1.35 (95% CI 0.37-4.89). All results were similar when the prior exposure to COVID-19 vaccine was extended to 8 weeks. This study suggests that Pfizer-BioNTech vaccine is not associated with increased risk of new-onset nor exacerbation of MG.