Background: Current studies suggest that vitamin D deficiency during pregnancy can produce a certain effect for preterm birth, but there is no research showing whether vitamin D deficiency has a consistent effect in different pregnancies; thus, we conducted a systematic review and meta-analysis of 24 observational studies, grouping them according to the gestational age at the time of serum sampling, to investigate whether vitamin D deficiency in different periods of gestation has different effects on preterm birth and to provide an evidence-based basis for pregnant women to measure and supplement vitamin D. Methods: The databases PubMed-Medline, EMBASE, the Cochrane Library, Web of Science, EBSCO, CBM, and CNKI were searched until July 2019. Two researchers independently assessed the eligibility and quality of studies, and STATA 12.0 software was used for meta-analysis. Result: Seven cohort studies, 13 case-control studies, and four cross-sectional studies were included from 2500 articles by inclusion and exclusion criteria. After adjusting for age, race, and other confounding factors, meta-analysis results showed that vitamin D deficiency in the first trimester, the second trimester and the third trimester did not increase the risk of preterm birth (odds ratio (OR) = 1.01, 95% confidence interval (CI) (0.88, 1.16), P = 0.867; OR = 1.12, 95%CI (0.92, 1.37), P = 0.249; OR = 1.05, 95%CI (0.87, 1.27), P = 0.602). However, there was moderate heterogeneity in the study of vitamin D deficiency in the second trimester, and subgroup analysis suggested that vitamin D deficiency in the second trimester may increase the risk of preterm birth (OR = 1.33, 95%CI (1.15, 1.54), P = 0.000). A sensitivity analysis of the second trimester showed that excluding any one study did not significantly change the results. Conclusions: Vitamin D deficiency in early and late pregnancy may not be associated with preterm birth, while vitamin D deficiency in middle pregnancy is likely to have an important effect on preterm birth. Vitamin D levels should be measured in the second trimester of pregnancy, and vitamin D supplements should be provided if necessary.