A recent study showed that a gestational high fat diet protects 3xTg-AD offspring from memory impairments, synaptic dysfunction, and brain pathology. However, it is unknown whether this diet exerts the same effects on normal mice or on other functions, and if so, how. In the present study, mother mice were pre-fed a high sugar and high fat (HSHF) diet for 1 month and then fertilized; the HSHF diet was continued until birth and then mother mice were returned to a standard diet. The gut microbiota, and intestinal and brain functions of the offspring were dynamically monitored at 7, 14, 28, and 56 days old until 16 months of age. Results showed that the HSHF diet significantly affected the gut microbiota structure of the offspring, especially during the early life stage. In addition, in the HSHF diet offspring, there were influenced on various types of neurons, including cholinergic and GABAergic neurons, on autophagy levels in the brain, and on inflammation levels in the intestinal tract. When the offspring grew older (16 months), we found that some genes of benefit against nervous system disease were activated, such as Lhx8, GPR88, RGS9, CD4, DRD2, RXRG, and Syt6, and the expression of cholinergic and GABAergic neurons biomarker protein increased. Although the inflammation levels in the nervous and peripheral systems showed no obvious differences, the AFP level of individuals on the HSHF diet was much higher than those on the standard diet, suggesting that more accurate and/or personalized nutrition is needed. Taken together, the results show that a maternal HSHF diet benefits the offspring by reducing the risk of nervous diseases, which might depend on LHX8 activation to modulate cholinergic and GABAergic neurons via the gut–brain axis, but still need much more deep studies.