Preterm infants with bronchopulmonary dysplasia (BPD) are at increased risk for dysfunctional immune responses in the postnatal period. This study aimed to verify the hypothesis that thymic function is altered in infants with BPD and changes in the expression of thymic function-related genes affect thymic development. Included in the study were infants who had a gestational age ≤32 weeks and survived to a postmenstrual age of ≥36 weeks. The clinical features and thymic size were comparatively studied between infants with and without BPD. Thymic function and the expression of thymic function-related genes were determined in BPD infants at birth, week 2, and 4 of life. The thymic size was ultrasonographically assessed in terms of the thymic index (TI) and thymic weight index (TWI). T-cell receptor excision circles (TRECs) and gene expression were quantitatively determined by real-time quantitative reverse transcription polymerase chain reaction. Compared to non-BPD infants, their BPD counterparts had a shorter GA, lower birth weight, lower Apgar scores at birth, and were more likely to be of the male gender. BPD infants had an elevated incidence of respiratory distress syndrome and sepsis. TI was 1.73 ± 0.68 versus 2.87 ± 0.70 cm3 and TWI was 1.38 ± 0.45 versus 1.72 ± 0.28 cm3/kg in the BPD group versus the non-BPD group (p < 0.05). In BPD infants, no significant changes were observed in thymic size, lymphocyte counts, and TREC copy numbers at the first 2 weeks (p > 0.05), but they all exhibited a significant increase at week 4 (p < 0.05). BPD infants presented a trend toward increased expression of transforming growth factor-β1 and decreased expression of forkhead box protein 3 (Foxp3) from birth to week 4 (p < 0.05). Nonetheless, no significant difference was found in IL-2 or IL-7 expression at all time points (p > 0.05). For preterm infants with BPD, reduced thymic size at birth might be associated with impaired thymic function. Thymic function was developmentally regulated in the BPD process. · For preterm infants with BPD, reduced thymic size at birth might be associated with impaired thymic.. · BPD infants had an elevated incidence of respiratory distress syndrome and sepsis.. · Thymic function was developmentally regulated in the BPD process..