To observe the effect of Xuebijing injection on sepsis combined with acute gastrointestinal injury (AGI), and analyze the risk factors of sepsis combined with AGI. A retrospective cohort study was conducted. Patients with non-gastrointestinal origin admitted to the department of intensive care medicine of the First Hospital of Qinhuangdao from May 1, 2021 to October 30, 2023 were enrolled. The baseline data, source of sepsis infection, vital signs, acute physiology and chronic health evaluation II (APACHE II), sequential organ failure assessment (SOFA), laboratory tests, comorbidities, interventions during treatment, and the 28-day prognosis were collected. The patients were divided into Xuebijing group and non-Xuebijing group according to whether Xuebijing injection was used or not. According to whether AGI was merged or not, patients were divided into merged AGI group and non-merged AGI group. The main observational indexes were the difference in the incidence of AGI between the Xuebijing group and non-Xuebijing group and the difference in the magnitude of the decline in procalcitonin (PCT), C-reactive protein (CRP), and white blood cell count (WBC) at 7 days after admission, and the difference in the 28-day morbidity and mortality. Risk factors for AGI in septic patients were explored by univariate analysis, and statistically significant indicators were screened and included in binary Logistic regression analysis to determine independent risk factors. A total of 129 patients with sepsis of non-gastrointestinal origin were enrolled, including 57 patients in the Xuebijing group and 72 patients in the non-Xuebijing group. Among 129 patients, 80 patients in the merged AGI group and 49 patients in the non-merged AGI group. There were no statistically significant differences between Xuebijing group and non-Xuebijing group in gender, age, body mass index (BMI), underlying disease, source of infection, vital sign, APACHE II score, SOFA score, and clinical intervention, and there were no statistically significant differences in laboratory tests except for aspartate aminotransferase (AST) and blood urea nitrogen (BUN). The incidence of AGI was significantly lower in the Xuebijing group than that in the non-Xuebijing group [50.87% (29/57) vs. 70.83% (51/72), P < 0.05], and the 28-day mortality was slightly lower than that in the non-Xuebijing group [24.56% (14/57) vs. 30.56% (22/72), P > 0.05]. In the Xuebijing group, the decreases in CRP, PCT and WBC at 7 days after admission were greater than those in the non-Xuebijing group, with statistically significant differences in the decreases of CRP and PCT [CRP (mg/L): 47.12±67.34 vs. 7.76±111.03, PCT (μg/L): 14.08 (-1.22, 50.40) vs. 2.94 (-1.27, 14.80), all P < 0.05]. Univariate analysis showed that the use of acid suppressants, the use of analgesic sedation, the non-use of Xuebijing injections, pulmonary infections, and urinary tract infections were the risk factors for the development of AGI in patients with sepsis. Binary Logistic regression analysis further showed that the use of acid suppressants [odds ratio (OR) = 2.450, 95% confidence interval (95%CI) was 1.021-5.883, P = 0.045], use of analgesic sedatives (OR = 2.521, 95%CI was 1.074-5.918, P = 0.034), and urinary tract infection (OR = 4.011, 95%CI was 1.085-14.831, P = 0.037) were independent risk factors for sepsis combined with AGI, in which the use of Xuebijing injection was a protective factor (OR = 0.315, 95%CI was 0.137-0.726, P = 0.007). Xuebijing injection reduced the incidence of AGI in patients with non-gastrointestinal sepsis. PCT and CRP decreased more markedly than in patients who did not use Xuebijing injection. The use of acid-suppressing agents, analgesic and sedative agents, and urinary tract infections were independent risk factors for sepsis in combination with AGI, while the use of Xuebijing injection is a protective factor.