The organophosphorus insecticide Chlorpyrifos (CPF) is widely used worldwide due to its high effectiveness. However, when ingested through the mouth and nose, it can cause severe neurotoxic effects and cognitive impairment. Natural anthocyanins show great potential in improving cognitive impairment. In this paper, we will delve into the protective effect of anthocyanins on CPF-induced cognitive impairment and its mechanism through the PI3K/Akt signaling pathway. Morris water maze, histopathological, ELISA and western blot analyses showed that anthocyanins effectively ameliorated CPF-induced spatial learning memory impairment in mice by ameliorating CPF-induced AChE inhibition, oxidative stress, and neuroinflammation and by modulating the levels of apoptosis (Caspase-3, Caspase-9) and autophagy (LC3II/ LC3I, Beclin1, p62, mTOR) biomarkers, in order to restore damaged hippocampal tissue morphology, neuron and synapse structures. To identify the action pathway of anthocyanins, we used KEGG and GO pathway enrichment analysis for screening prediction and western blot and molecular docking to verify that anthocyanins improve CPF-induced cognitive impairment by activating the PI3K/Akt pathway.