Objective To investigate the pleural effusion lymphocyte subsets in patients with pneumonia complicated with pleural effusion and its relationship with the occurrence of critical illness. MethodsPatients with pneumonia complicated with pleural effusion (246 cases) admitted to our hospital from January 2020 to June 2022 were selected as the research subjects. According to the severity of pneumonia, they were divided into a critical group (n=150) and a non-critical group (n=96). After 1:1 matching by propensity score matching method, there were 60 cases in each group. The general data of the two groups were compared. CD3+, CD4+, CD8+, CD4+/CD8+ ratio were detected by flow cytometry. Multivariate logistic regression was used to analyze the risk factors of critical pneumonia, and a nomogram prediction model was constructed and evaluated. The relationship between PSI score and lymphocyte subsets in pleural effusion was analyzed by local weighted regression scatter smoothing (LOWESS). Results After matching, the differences between the two groups of patients in the course of disease, heat peak, heat course, atelectasis, peripheral white blood cell count (WBC), C-reactive protein (CRP), D-dimer (D-D), procalcitonin (PCT) and hemoglobin were statistically significant (P<0.05). Compared with the non-critical group, the proportion of CD3+, CD4+, CD4+/CD8+ cells in critical group was lower (P<0.05), and the proportion of CD8+ cells was higher (P<0.05). Combined atelectasis, increased course of disease, fever peak and fever course, increased WBC, CRP, D-D, CD8+ and PCT levels, and decreased CD3+, CD4+, CD4+/CD8+ and Hb levels were independent risk factors for the occurrence of critical pneumonia (P<0.05). The nomogram prediction model based on independent influencing factors had high discrimination, accuracy and clinical applicability. There was a certain nonlinear relationship between pneomonia severity index and CD3+, CD4+, CD8+ and CD4+/CD8+. Conclusions Lymphocyte subsets in pleural effusion are closely related to the severity of pneumonia complicated with pleural effusion. If CD3+, CD4+, CD8+ and CD4+/CD8+ are abnormal, attention should be paid to the occurrence of severe pneumonia.