Objectives: To analyze the relationship between serum 25-hydroxyvitamin D [25(OH)D] levels and lung diseases (wet lung, RDS, BPD, pneumothorax) in preterm infants. Methods: Preterm infants (corrected gestational age <37 weeks) hospitalized in the neonatology department of Yan'an University Hospital from January 2023 to December 2023 were selected as the study subjects, and their clinical data and 25-hydroxyvitamin D [25(OH)D] levels in the first 24 h of life were collected (by the random number table method to avoid selection bias) in a retrospective cohort study with the basis of the Serum 25(OH)D level was used to categorize preterm infants into high vitamin D and low vitamin D groups, and to compare the incidence of lung diseases in preterm infants in the 2 groups. Results: A total of 414 preterm infants were selected, and 237 preterm infants were finally included for analysis. The mean serum 25(OH)D level in preterm infants within 24 hours of birth was 16.97 ng/mL. 140 cases in the low-vitamin D group had a serum 25(OH)D level of (11.88± 2.74) ng/mL. 97 cases in the high-vitamin D group had a serum 25(OH)D level of (24.31± 7.52) ng/mL; the rate of births in the fall in the low-vitamin D group was was significantly higher than that of the high-vitamin D group (P<0.05), the utilization rate of lung surface active substance was higher than that of the high-vitamin D group (P<0.05), and the incidence of RDS and BPD was significantly higher than that of the high-vitamin D group (P<0.05). Univariate logistic regression analysis suggested that season of birth, serum 25(OH)D level, 5 min Apgar score and prenatal hormone use were associated with pulmonary complications in preterm infants (P<0.05). Multifactorial logistic regression analysis showed that higher serum 25(OH)D levels reduced the risk of pulmonary complications in preterm infants, which was statistically significant (B=-0.056, RR= 0.946, 95% CI: 0.910-0.984, P=0.006); higher 5-min Apgar scores had a lower incidence of pulmonary complications in preterm infants, which was statistical significance (B=-0.722, RR= 0.486, 95% CI: 0.281~0.840, P=0.010); prenatal use of hormones will reduce the risk of pulmonary complications in preterm infants (B=-0.763, RR= 0.466, 95% CI: 0.261~0.833, P=0.010). Conclusion: Low vitamin D levels at birth in preterm infants may increase the incidence of RDS and BPD.