Background: Overweight and hyperglycemia might result in poor prognosis in patients with severe community-acquired pneumonia (SCAP). XueBiJing treatment could significantly improve the outcomes of patients with SCAP. We investigated the efficacy of XueBiJing injection in patients with SCAP stratified by body mass index (BMI) and fasting blood glucose (FBG).Methods: This is a post hoc analysis of XueBiJing trial, a large prospective, randomized, controlled study conducted in 33 hospitals in China. We compared data from non-overweight (BMI <24 kg/m2, n = 425) vs. overweight (BMI ≥24 kg/m2, n = 250) patients as well as non-hyperglycemia (FBG <7 mmol/L, n = 315) vs. hyperglycemia (FBG ≥7 mmol/L, n = 360) patients with XueBiJing, 100 ml, q12 h, or a visually indistinguishable placebo treatment for 5–7 days.Results: Among patients with BMI <24 kg/m2 (n = 425), 33 (15.3%), XueBiJing recipients and 52 (24.9%) placebo recipients (p = 0.0186) died within 28 days. Among patients with BMI ≥24 kg/m2 (n = 250), XueBiJing recipients still had lower mortality (XueBiJing 16.9% vs. placebo 24.2%; p = 0.2068) but without significantly statistical difference. For the FBG group, patients with FBG <7 mmol/L (n = 315), 18 (11.2%) XueBiJing recipients and 32 (20.8%) placebo recipients (p = 0.030) died within 28 days. Among patients with FBG ≥7 mmol/L (n = 360), XueBiJing recipients still had lower mortality (XueBiJing 20.2% vs. placebo 27.8%; p = 0.120) but without significantly statistical difference. The total duration of the ICU stay and the duration of mechanical ventilation were similar in both groups (p > 0.05).Conclusion: Overweight or hyperglycemia might weaken the efficacy of XueBiJing injection in the treatment of SCAP as indicated by the significant elevated risk of 28-day mortality. Additional studies are needed to validate our findings and to further understand the underlying mechanisms.