As the global population ages, cognitive decline in older adults has gained significant attention in public health, underscoring the urgent need for effective intervention strategies. This study investigates the impact of salmon protein hydrolysate (SPH) on gut microbiota and cognitive decline in aged rats. Over 8 weeks, aged Sprague-Dawley rats were treated with SPH, resulting in significant enhancements in cognitive function as evidenced by operant-based attentional set-shifting and Morris water maze tasks. SPH modulated microglial activation in the hippocampus, reducing M1 polarization and promoting M2 polarization. RT-PCR analysis indicated a decrease in pro-inflammatory cytokines and an increase in anti-inflammatory cytokines, suggesting a reduction in neuroinflammation. Additionally, 16S rRNA gene sequencing revealed that SPH transformed gut microbiota, increasing Bacteroidetes and decreasing Proteobacteria. The bacterial genera Prevotella, Bacteroidetes and Ruminococcus showed notable increases. Furthermore, SPH intervention can also increase the concentrations of certain short-chain fatty acids (SCFAs) in aged rats. Additionally, SPH also restored the Th17/Treg balance and decreased peripheral inflammation. This study offers compelling evidence for SPH as a functional food that may mitigate cognitive decline due to aging.