Background: Bronchopulmonary dysplasia (BPD) refers to a chronic lung disease which is commonly observed in preterm infants. It can usually be caused by several pathological processes that endanger the long-term lung development, such as inflammation and immune dysfunction. Methods: In this study, a bioinformatics approach was applied to identify the differentially expressed immune-related genes (DEIRGs). We downloaded the transcriptional profiles (GSE32472 dataset) from the Gene Expression Omnibus (GEO) database and performed gene set enrichment analysis (GSEA). Cell type Identification By Estimating Relative Subsets of RNA Transcripts (CIBERSORT), microenvironment cell populations counter (MCPcounter), and Estimation of STromal and Immune cells in Malignant Tumor tissues using Expression data (ESTIMATE) were used for the analysis of the immune cell infiltration landscape of BPD. A weighted co-expression network was subsequently constructed using weighted gene co-expression network analysis (WGCNA) to screen candidate differentially expressed immune related genes (DEIRGs). Results: GSEA results indicated that immune-related pathways were mainly involved in BPD. Ten significantly different immune cell types were observed between BPD and normal groups. A total of 228 DEGs in the turquoise module were identified, and 31 DEIRGs were further identified. Cluster of the differentiation 8 alpha (CD8A) expression was down-regulated in BPD, and its expression was validated by the GSE25286, GSE25293, GSE99633 datasets and qRT-PCR. In addition, CD8A expression was closely associated with immune cells infiltration, especially T cells CD8 and neutrophil. Conclusion: A distinct immune cell infiltration landscape was found between BPD and normal group. CD8A can be a novel candidate biomarker for BPD, which plays an essential role in the onset and progress of hyperoxia-related BPD via the disruption of immune cell functions.