Mastication is a fundamental function critical for human health. Controlled by the central nervous system (CNS), it influences CNS development and function. A poor masticatory performance causes cognitive dysfunction in both older adults and children. Improving mastication may prevent cognitive decline. However, no study has determined the period of masticatory dysfunction that impairs children’s later acquisition of cognitive function. Herein, we developed an animal model wherein a soft diet was switched to a normal diet at early and late time points in young mice. We aimed to investigate the impact of restored mastication on learning and memory function. Behavioral studies were conducted to evaluate learning and memory. Micro-CT was used to evaluate orofacial structural differences, while histological and biochemical approaches were employed to assess differences in the hippocampal morphology and function. Correction to a hard-textured diet before adolescence restored mastication and cognitive function through the stimulation of neurogenesis, extracellular signal-regulated kinases, the cyclic adenosine monophosphate-response element-binding protein pathway, and the brain-derived neurotrophic factor, tyrosine receptor B. In contrast, post-adolescent diet normalization failed to rescue full mastication and led to impaired cognitive function, neuronal loss, and decreased hippocampal neurogenesis. These findings revealed a functional linkage between the masticatory and cognitive function in mice during the juvenile to adolescent period, highlighting the need for adequate food texture and early intervention for mastication-related cognitive impairment in children.