Stigma maydis polysaccharide (SMPS) is a plant polysaccharide that participates in immune regulation and gastrointestinal motility. Autism spectrum disorder (ASD) refers to a group of neurodevelopmental disorders, and ASD patients often present intestinal microflora imbalance problems; however, there is no effective treatment method. This study explores the effect of SMPS intervention on the gut microbiota in autism model rats as well as the potential action pathways. Female Wistar rats were intraperitoneally injected with sodium valproic acid (VPA) or normal saline at embryonic day 12.5 to establish an autism model or normal control in their offspring. The offspring prenatally exposed to VPA were randomly assigned to the VPA and the SMPS groups. The SMPS group was administered SMPS from E0.5 to postnatal day (PND) 21. We performed 16S rRNA and transcriptomics analyses to reveal the gut microbiota (GM) and differentially expressed genes in the autism model rats in response to SMPS intervention. SMPS intervention significantly improved the diversity and structure of the GM in autism model rats compared with the VPA rats. Moreover, the relative abundance of Prevotellaceae and Lachnospiraceae_NK4A136_group was increased after SMPS intervention. Transcriptome sequencing showed that 496 differentially expressed genes (DEGs) were identified after SMPS administration compared with the VPA group. Meanwhile, gene ontology (GO) enrichment analysis of DEGs was showed that the SMPS group had significant 653 GO terms. SMPS intervention had a major influence on oxidative phosphorylation, retrograde endocannabinoid signaling, thermogenesis, ribosome, protein digestion and absorption, renin-angiotensin system, calcium signaling pathway, glycosphingolipid biosynthesis-ganglio series, and propanoate metabolism pathways. Overall, this study suggests that SMPS interventions in early life may have an impact on gut microbiota, and then affect the transcriptomics levels of the hippocampal tissue in the VPA-induced autism model rats. It provides scientific evidence for the role of the microbe-gut-brain axis in ASD research.