Leukemia is the most common childhood cancer and its etiology could be related to various environmental contaminants such as particulate matter (PM). The objective of our study is to evaluate the potential association between exposure to PM during pregnancy and the incidence of childhood leukemia. We established a population-based nationwide cohort using the Spanish Birth Registry Statistics database of the National Statistics Institute. We used spatiotemporal land use random forest models to estimate the concentrations of PM10 and PM2.5 for the entire pregnancy and by trimesters. We conducted logistic regression analyses adjusted for various covariates. In addition, we fitted generalized additive models (GAMs) to estimate the non-linear relationship between PM levels and leukemia incidence. The study included 3,112,123 children and 1066 cases of leukemia. The results for the continuous variable of PM10 exposure levels suggested an increased risk of childhood leukemia to be associated with higher exposure. The results for the categorized PM10 variable suggest an increased risk of childhood leukemia among pregnant women whose exposure levels were higher than the median (third and fourth quartiles). The results for PM2.5 were weaker. We found association between exposure to PM10 during pregnancy and an increased risk of childhood leukemia. Our findings indicate that public health interventions should aim to reduce air pollution to lower the incidence of childhood leukemia.