Despite the high vaccination coverage, potential COVID‐19 vaccine‐induced adverse effects, especially in pregnant women, have not been fully characterized. We examined the association between COVID‐19 vaccination before conception and maternal thyroid function during early pregnancy. We conducted a retrospective cohort study in Shanghai, China. A total of 6979 pregnant women were included. Vaccine administration was obtained from electronic vaccination records. Serum levels of thyroid hormone were measured by fluorescence and chemiluminescence immunoassays. Among the 6979 included pregnant women, 3470 (49.7%) received at least two doses of an inactivated vaccine. COVID‐19 vaccination had a statistically significant association with both maternal serum levels of free thyroxine (FT4) and thyroid stimulating hormone (TSH). Compared with unvaccinated pregnant women, the mean FT4 levels were lower in pregnant women who had been vaccinated within 3 months before the date of conception by 0.27 pmol/L (β = −0.27, 95% confidence interval [CI], −0.42, −0.12), and the mean TSH levels were higher by 0.08 mIU/L (β = 0.08, 95% CI, 0.00, 0.15). However, when the interval from vaccination to conception was prolonged to more than 3 months, COVID‐19 vaccination was not associated with serum FT4 or TSH levels. Moreover, we found that COVID‐19 vaccination did not significantly associate with maternal hypothyroidism. Our study suggested that vaccination with inactivated COVID‐19 vaccines before conception might result in a small change in maternal thyroid function, but this did not reach clinically significant levels.