Our data suggest that the levels of infiltrating CD8+ T cells, CD8+PD-L1+ T cells, and CD68+CD163+ M2 macrophages in the total region were independent prognostic factors for PFS in NSCLC patients treated with ICIs. Here, CD274 is linked to non-small cell lung carcinoma.