The developmental period constitutes a critical window of sensitivity to stress. Indeed, early-life adversity increases the risk to develop psychiatric diseases, but also gastrointestinal disorders such as the irritable bowel syndrome at adulthood. In the past decade, there has been huge interest in the gut–brain axis, especially as regards stress-related emotional behaviours. Animal models of early-life adversity, in particular, maternal separation (MS) in rodents, demonstrate lasting deleterious effects on both the gut and the brain. Here, we review the effects of MS on both systems with a focus on stress-related behaviours. In addition, we discuss more recent findings showing the impact of gut-directed interventions, including nutrition with pre- and probiotics, illustrating the role played by gut microbiota in mediating the long-term effects of MS. Overall, preclinical studies suggest that nutritional approaches with pro- and prebiotics may constitute safe and efficient strategies to attenuate the effects of early-life stress on the gut–brain axis. Further research is required to understand the complex mechanisms underlying gut–brain interaction dysfunctions after early-life stress as well as to determine the beneficial impact of gut-directed strategies in a context of early-life adversity in human subjects.