In this study, we found that the baseline level of peripheral CD8+ T lymphocytes was the independent risk factor of the onset of irAEs, and it was associated with longer survival in advanced NSCLC patients treated with PD-1/PD-L1 inhibitors. The gene discussed is CD8A; the disease is non-small cell lung carcinoma.