To evaluate the association between gestational age and green areas, urban built areas, and the concentration of particulate matter 2.5 (PM2.5) in the city of São Paulo, analyzing the irregular distribution of these areas and pollution levels above the recommended level. The study population consisted of a cohort of live births from 2012, and data from the Live Birth Information System (Sinasc) of the city of São Paulo were used. Using satellite images and supervised classification, the distribution and quantity of green areas and built areas in the city of São Paulo was obtained, as well as the concentrations of PM2.5. Logistic regressions were used to obtain possible associations. The results of the study show that a lower percentage of green areas is significantly associated with a higher chance of preterm births. A higher building density was positively associated with the odds ratio for preterm birth. We did not find any significant associations between air pollution (PM2.5) and preterm births. The results of this study show that greener areas are less associated with preterm births when compared with less green areas.