Vascular dementia (VD) is a common disease that occurs during human aging. Gastrodin (GAS) has potential benefits for the prevention and treatment of VD. In the present study, we investigated the effects of GAS on cognitive dysfunction in rats with VD induced by permanent middle cerebral artery occlusion (pMCAO) and explored the underlying mechanism. Immunohistochemical and western blot analyses revealed that GAS attenuated hippocampal levels of LC3 (microtubule-associated protein 1 light chain 3), p62, and phosphorylated CaMKII (Ca2+-calmodulin stimulated protein kinase II) in VD rats. Additionally, our results revealed that cobalt chloride blocked autophagic flux in HT22 cells, which was confirmed by increased levels of LC3 and p62 when combined with chloroquine. Notably, GAS ameliorated the impaired autophagic flux. Furthermore, we confirmed that GAS combined with KN93 (a CaMKII inhibitor) or CaMKII knockdown did not impact the reduced p62 levels when compared with GAS treatment alone. Furthermore, a co-immunoprecipitation assay demonstrated that endogenous p62 bound to CaMKII, as confirmed by mass spectrometric analysis after the immunoprecipitation of p62 from HT22 cells. These findings revealed that GAS attenuated autophagic flux dysfunction by inhibiting the Ca2+/CaMKII signaling pathway to ameliorate cognitive impairment in VD.