The study aimed to investigate the alleviation of an ethanol-induced gastric ulcer in mice by apolysaccharide (PSP) from purple sweet potato (Ipomoea batatas (L.) Lam) and explore the mechanism. The anti-ulcer activity was determined by histopathological evaluation, total gastric acidity, pepsin activity, gastric ulcer index and gastric ulcer inhibition rate. The expression levels of inflammatory factors were detected using ELISA. A special protein meter was used to detect the content of immunoglobulin lgM, immunoglobulin lgG, and complements C3 and C4 in the serum of mice. The expression of CD4+/CD8+ lymphocyte subsets of mice was detected using flow cytometry. Western blot analysis was used to examine the effect of PSP on the PI3K/Akt/Rheb/mTOR pathway. The results showed that PSP could effectively reduce the total gastric acidity, pepsin activity, and the index and inhibition rate of gastric ulcers. At the same time, PSP could significantly increase the levels of immunoglobulins (lgG and lgM) and complements (C3 and C4). It could also increase the activity of peritoneal macrophages in mice and the expression of CD4+/CD8+ in the spleen. ELISA analysis showed that the contents of TNF-α, IL-1β and IL-6 were significantly decreased and the content of IL-10 was significantly increased in the PSP group. The western blot analysis showed that PSP could upregulate the relative protein expressions of MUC5AC, PI3K, p-Akt, Rheb and mTOR. These results indicate that PSP can activate the PI3K/Akt/Rheb/mTOR signaling pathway to improve the immunity of mice and maintain the balance of the immune system, thereby protecting the gastric mucosa and improving stress gastric ulcers.