Objective: To investigate the effects of pre-pregnancy and prenatal exposure to six major air pollutants (CO, NO2, O3, PM10, PM2.5, SO2) on birth weight in newborns and identify critical exposure windows. Methods: This retrospective cohort study analyzed data from 1 561 mother-infant pairs who delivered at Taiyuan Central Hospital between January 2020 and December 2023, combined with contemporaneous air pollution monitoring records. This study used the geographic information system (GIS) technology to evaluate the individual air pollutants exposure level of pregnant women, and calculated the average pollutant concentrations for four stages: preconception (the 12 weeks before conception), first trimester (weeks 1-13), second trimester (weeks 14-27) and third trimester (weeks 28-37). Multiple linear regression models were used to assess the associations between air pollutant exposure and birth weight at different pregnancy stages. The distributed lag nonlinear model (DLNM) was further constructed to characterize the nonlinear exposure-lag-response relationships, identify sensitive windows, and examine sex differences. Results: Preliminary multiple linear regression showed that third-trimester exposures to PM2.5(β^=-43.00, 95%CI:-79.40- -6.68), PM10(β^=-35.00, 95%CI:-66.00- -4.07), NO2(β^=-35.50, 95%CI:-66.90- -4.08) and SO2(β^=-28.80, 95%CI:-52.70- -4.97) were negatively associated with birth weight (all P<0.05), but these associations disappeared after full adjustment for covariates. DLNM analysis revealed exposure-response relationships for CO, O3, PM10, and SO2 on birth weight, with distinct critical exposure windows: CO (weeks 2-13, 14-20), O3 (weeks 4-13, 14-24), PM10 (weeks 22-27, 28-37), and SO2 (weeks 11-13, 14-27 and 28-37). Among these, the largest effect were observed for CO at gestational week 12, O3 at week 13, and for both PM10 and SO2 at week 37. The effect estimates and their 95% confidence intervals were -37.12(-62.78- -11.45), -3.61(-6.45- -0.77), -5.01(-8.98- -1.04) and -8.31(-12.07- -4.56), all P<0.05. Gender differences in pollutant effects were observed: male newborns were more sensitive to SO2 across multiple stages, to CO in mid-pregnancy, and to PM10 in late-pregnancy; female newborns were more susceptible to PM10 in the preconception and early-to-mid-pregnancy periods, to O3 in early-to-mid pregnancy, and to SO2 in late pregnancy. Conclusion: Exposure to air pollutants during pregnancy is associated with reduced birth weight in newborns. Different pollutants have specific exposure windows, and gender differences exist. This finding provides important scientific evidence for preventing adverse pregnancy outcomes and developing intervention strategies to improve neonatal health.