Early undernutrition has been found to be closely associated with subsequent neurodevelopment. However, studies examining crude growth in terms of body weight/tail length cannot clarify how diets might mediate associations between the gut microbiota and cognitive dysfunction. In the present study, Sprague-Dawley (SD) rats were fed a 7% protein diet and mung bean protein diet (MBPD) for 6 weeks to assess central nervous system functions. Bifidobacterium longum subsp, Alloprevotella, and Lactobacillus were significantly altered after supplementary MBPD. Additionally, tryptophan, tyrosine, and glycine significantly restored in the brain, and the choline system also improved. Moreover, mung bean supplementation also upregulated expression of the brain-derived neurotrophic factor, postsynaptic density 95 protein (PSD95), synaptosome-associated protein 25 (SNAP25), downregulated toll-like receptor 4 (TLR4), and nuclear factor kB (NF-kB). Metabolites in the serum also underwent changes. Together, these results showed that malnutrition perturbed neurodevelopment, while MBPD reversed this trend.