Context Xiaojianzhong decoction (XJZD), classically prescribed in Chinese medicine, has protective and healing effects on gastric mucosal injury. However, the exact mechanism behind this effect remains unclear. Objective To investigate the effect of XJZD on gastric mucosal injury and explore its underlying mechanisms. Materials and methods C57BL/6 mice were randomized into six groups (n = 10): the control group receiving sterile water, the model (aspirin 300 mg/kg), the XJZD high-dose (12 g/kg), XJZD medium-dose (6 g/kg), XJZD low-dose (3 g/kg) and omeprazole (20 mg/kg) groups, by gavage daily for 14 days. The area of gastric mucosal injury, mucosal injury index and degree of histopathological damage were analysed. Gastric mucosal epithelial cell apoptosis was detected. Epithelial cell autophagy was observed. The expression levels of tight junction proteins and proteins related to apoptosis, autophagy and the pentose phosphate pathway were analysed. Results The results showed that after treatment with XJZD (12, 6 and 3 g/kg), the mucosal injury area was reduced (83.4%, 22.6% and 11.3%), the expression level of ZO-1 and occludin was up-regulated, the apoptosis rate of epithelial cells was reduced (40.8%, 25.4% and 8.7%), the expression of autophagy-related proteins LC3 and Beclin1 was decreased and the expression of p62 was increased, the PI3K/AKT/mTOR/ULK1(ser757) signalling pathway was activated, and the AMPK/ULK1(ser317) signalling pathway was inhibited. In addition, XJZD can antagonize the imbalance of redox homeostasis caused by aspirin and protect the gastric mucosa. Discussion and conclusions XJZD protects against aspirin-induced gastric mucosal injury, implying it to be a potential therapeutic agent.