IMPORTANCE: Pregnant people are at high risk for severe COVID-19 but were excluded from mRNA vaccine trials; data on COVID-19 vaccine effectiveness (VE) are needed. OBJECTIVE: To evaluate the estimated effectiveness of mRNA vaccination against medically attended COVID-19 among pregnant people during Delta and Omicron predominance. DESIGN, SETTING, AND PARTICIPANTS: This test-negative, case-control study was conducted from June 2021 to June 2022 in a network of 306 hospitals and 164 emergency department and urgent care (ED/UC) facilities across 10 US states, including 4517 ED/UC encounters and 975 hospitalizations among pregnant people with COVID-19-like illness (CLI) who underwent SARS-CoV-2 molecular testing. EXPOSURES: Two doses (14-149 and ≥150 days prior) and 3 doses (7-119 and ≥120 days prior) of COVID-19 mRNA vaccine (≥1 dose received during pregnancy) vs unvaccinated. MAIN OUTCOMES AND MEASURES: Estimated VE against laboratory-confirmed COVID-19-associated ED/UC encounter or hospitalization, based on the adjusted odds ratio (aOR) for prior vaccination; VE was calculated as (1 - aOR) × 100%. RESULTS: Among 4517 eligible CLI-associated ED/UC encounters and 975 hospitalizations, 885 (19.6%) and 334 (34.3%) were SARS-CoV-2 positive, respectively; the median (IQR) patient age was 28 (24-32) years and 31 (26-35) years, 537 (12.0%) and 118 (12.0%) were non-Hispanic Black and 1189 (26.0%) and 240 (25.0%) were Hispanic. During Delta predominance, the estimated VE against COVID-19-associated ED/UC encounters was 84% (95% CI, 69% to 92%) for 2 doses within 14 to 149 days, 75% (95% CI, 5% to 93%) for 2 doses 150 or more days prior, and 81% (95% CI, 30% to 95%) for 3 doses 7 to 119 days prior; estimated VE against COVID-19-associated hospitalization was 99% (95% CI, 96% to 100%), 96% (95% CI, 86% to 99%), and 97% (95% CI, 79% to 100%), respectively. During Omicron predominance, for ED/UC encounters, the estimated VE of 2 doses within 14 to 149 days, 2 doses 150 or more days, 3 doses within 7 to 119 days, and 3 doses 120 or more days prior was 3% (95% CI, -49% to 37%), 42% (95% CI, -16% to 72%), 79% (95% CI, 59% to 89%), and -124% (95% CI, -414% to 2%), respectively; for hospitalization, estimated VE was 86% (95% CI, 41% to 97%), 64% (95% CI, -102% to 93%), 86% (95% CI, 28% to 97%), and -53% (95% CI, -1254% to 83%), respectively. CONCLUSIONS AND RELEVANCE: In this study, maternal mRNA COVID-19 vaccination, including booster dose, was associated with protection against medically attended COVID-19. VE estimates were higher against COVID-19-associated hospitalization than ED/UC visits and lower against the Omicron variant than the Delta variant. Protection waned over time, particularly during Omicron predominance.