Autism spectrum disorder (ASD) is a neurodevelopmental disorder characterized by reduced social interactions, impaired communication, and stereotyped behavior. The aim of this research is to investigate the changes in serotonin (5-HT) in the medial prefrontal cortex (PFC) of autism-like offspring induced by maternal lipopolysaccharide (LPS) exposure. Pregnant Sprague-Dawley rats were intraperitoneally injected with LPS to establish an autism-like model in their offspring. Offspring prenatally exposed to LPS showed autism-like behavior. The serotonin level in the mPFC of 2-week-old offspring was noticeably increased after maternal LPS exposure. Differentially expressed genes (DEGs) were enriched in pathways related to tryptophan metabolism and the serotonin system, as shown in RNA-seq findings. Consistently, tryptophan and serotonin metabolisms were altered in 2-week-old LPS-exposed offspring. The mRNA expression levels of 5-HT catabolic enzymes were remarkably reduced or tended to decrease. Moreover, maternal LPS exposure resulted in a higher serotonin 1B receptor (5-HT1BR) expression level in the mPFC but no difference in tryptophan hydroxylase 2 (TPH2) or serotonin reuptake transporter (SERT). The concentrations of 5-HT in serum and colon were increased in LPS-exposed offspring. Meanwhile, the expression level of tryptophan hydroxylase 1 (TPH1) in the colon was increased after maternal LPS treatment, whereas SERT was reduced. Furthermore, Golgi-Cox staining showed that neuronal dendritic length and spine density were significantly reduced in the mPFC of LPS-exposed offspring. The current study reveals that maternal LPS treatment resulted in an exaltation of the 5-HT of mPFC in ASD-like young rats, which may partly be caused by the abnormal elevation of 5-HT metabolism in its colon.