Anxiety disorders and depression are well-documented in subjects exposed to adverse childhood events. Recently, maternal obesity and/or maternal consumption of high-fat diets (HFD) have been also proposed as risk factors for offspring mental health. Here using an animal model in rats, we explored the combinatorial effects of a maternal HFD (40% of energy from fat without impact on maternal weight; during gestation and lactation) and maternal separation (MS) in offspring. In the prefrontal cortex (PFC) of pups, MS led to changes in the expression of several genes such as Bdnf (brain derived neurotrophic factor), 5HT-r1a (serotonin receptor 1a) and Rest4 (neuron-restrictive silencer element, repressor element 1, silencing transcription factor (Rest), splicing variant 4). Surprisingly, perinatal HFD strongly attenuated the developmental alterations induced by MS. Furthermore, maternal HFD totally prevented the endophenotypes (anxiety, spatial memory, social behavior, hypothalamic-pituitary-adrenal (HPA) axis response to stress, hippocampal neurogenesis and visceral pain) associated with MS at adulthood. Finally, we also demonstrated that HFD intake reduced anxiety and enhanced maternal care in stressed dams. Overall, our data suggest that a HFD restricted to gestation and lactation, which did not lead to overweight in dams, had limited effects in unstressed offspring, highlighting the role of maternal obesity, rather than fat exposure per se, on brain vulnerability during development.