We assessed dynamic changes in visceral hypersensitivity and fecal metabolomics through a mouse model of irritable bowel syndrome (IBS) from childhood to adulthood. A mouse model of IBS was constructed with maternal separation (MS) in early life. Male mice aged 25, 40, and 70 days were used. Visceral sensitivity was assessed by recording the reaction between the abdominal withdrawal reflex and colorectal distension. Metabolomics was identified and quantified by liquid chromatography-tandem mass spectrometry. The visceral sensitivity of the MS group was significantly higher than that of the non-separation (NS) group in the three age groups. The top four fecal differential metabolites in the different age groups were lipids, lipid molecules, organic heterocyclic compounds, organic acids and derivatives, and benzenoids. Five identical differential metabolites were detected in the feces and ileal contents of the MS and NS groups at different ages, namely, benzamide, taurine, acetyl-L-carnitine, indole, and ethylbenzene. Taurine and hypotaurine metabolism were the most relevant pathways at P25, whereas histidine metabolism was the most relevant pathway at P40 and P70. Visceral hypersensitivity in the MS group lasted from childhood to adulthood. The different metabolites and metabolic pathways detected in MS groups of different ages provide a theoretical basis for IBS pathogenesis.