To investigate the predictive value of chest computed tomography (CT) combined with peripheral blood CD4/CD8 in patients with cerebral infarction complicated with pulmonary infection. Lung consolidation, tree and bud sign, focus calcification ratio, C-reactive protein (CRP), procalcitonin (PCT), and interleukin-6 (IL-6) were significantly higher in the infected group than in the non-infected group, and CD4 and CD4/CD8 were significantly lower than in the non-infected group (P < 0.05). The results of stratified regression analysis showed that CRP, PCT, IL-6, lung consolidation, tree and bud sign, and calcification all had significant negative effects on CD4/CD8 (t=-5.875, -3.441, -10.406, -7.741, -3.977, -6.547, all P < 0.05). Lung consolidation, tree and bud signs, calcifications, elevated CRP, elevated PCT, and elevated IL-6 were risk factors for patients with pulmonary infection, and increased CD4/CD8 was a protective factor (P < 0.05). There was a non-linear dose-response relationship between CD4/CD8 and the risk of concurrent pulmonary infection (Pnon-linearity=0.037), with a cut-off value of 0.98. The sensitivity, specificity, positive predictive value, and negative predictive value of combined diagnosis were significantly higher than CD4/CD8 (χ2=6.098, 4.640, 4.643, 6.076, P = 0.014, 0.031, 0.031, 0.014), and the area under the ROC curve of combined diagnosis was significantly higher than chest CT and peripheral blood CD4/CD8 (Z = 4.018, 5.112, P = 0.046, 0.037). Thoracic CT combined with peripheral blood CD4/CD8 can improve the diagnostic efficiency of cerebral infarction patients complicated with pulmonary infection and provide reference for clinical diagnosis and treatment.