Background: Neonatal maternal separation (NMS) is a major early life stress that can induce visceral pain and mental disorders. We have shown that an enriched environment (EE) can alleviate NMS-induced negative effects, but the time window over which EE works is unclear. Therefore, this study aimed to investigate the time window through which EE alleviates NMS-induced visceral pain, anxiousness, and depressive behaviors.Methods: In this study, we used male C57BL/6J mice. The mice were randomly divided into five groups: control group, NMS group, prepubertal EE group (EE1 group), pubertal EE group (EE2 group), and adult EE group (EE3 group). The visceral pain threshold test (PTT), open field test (OFT), elevated plus maze (EPM), forced swimming test (FST), and sucrose preference test (SPT) were performed in all five groups to assay visceral pain, anxiety-, and depression-like behaviors in mice, respectively. Enzyme-linked immunosorbent assay (ELISA) for corticosterone was performed in all five groups to assess the function of the hypothalamic-pituitary-adrenal (HPA) axis.Results: There was no significant change in weight between groups. It was shown that NMS induced visceral pain, anxiety, and depression, and EE1 and EE2 reversed these negative effects, but EE3 had no significant effect. Likewise, EE1 and EE2 reversed the NMS-induced increase of corticosterone, but EE3 did not.Conclusions: Adverse life experiences in early life can lead to visceral pain, anxiety, and depression in adulthood, which can be effectively prevented by EE interventions in prepuberty and puberty.