Background: Pterostilbene (PTE) is a natural polyphenol compound that has been proven to improve intestinal inflammation, but its laxative effect on slow transit constipation (STC) has never been studied. This study aims to investigate the laxative effect of PTE on loperamide (LOP)-induced STC mice and its influence on intestinal microbes through a combination of network pharmacological analysis and experimental verification.Material and Methods: PTE was used to treat LOP-exposed mice, and the laxative effect of PTE was evaluated by the total intestinal transit time and stool parameters. The apoptosis of Cajal interstitial cells (ICCs) was detected by immunofluorescence. The mechanism of PTE’s laxative effect was predicted by network pharmacology analysis. We used western blot technology to verify the predicted hub genes and pathways. Malondialdehyde (MDA) and GSH-Px were tested to reflect oxidative stress levels and the changes of gut microbiota were detected by 16S rDNA high-throughput sequencing.Results: PTE treatment could significantly improve the intestinal motility disorder caused by LOP. Apoptosis of ICCs increased in the STC group, but decreased significantly in the PTE intervention group. Through network pharmacological analysis, PTE might reduce the apoptosis of ICCs by enhancing PI3K/AKT and Nrf2/HO-1 signaling, and improve constipation caused by LOP. In colon tissues, PTE improved the Nrf2/HO-1 pathway and upregulated the phosphorylation of AKT. The level of MDA increased and GSH-Px decreased in the STC group, while the level of oxidative stress was significantly reduced in the PTE treatment groups. PTE also promoted the secretion of intestinal hormone and restored the microbial diversity caused by LOP.Conclusion: Pterostilbene ameliorated the intestinal motility disorder induced by LOP, this effect might be achieved by inhibiting oxidative stress-induced apoptosis of ICCs through the PI3K/AKT/Nrf2 signaling pathway.