Diabetic cognitive impairment is a central nervous complication of diabetes mellitus. Its specific pathogenesis is unknown, and no effective treatment strategy is currently available. An imbalance in actin dynamics is an important mechanism underlying cognitive impairment. Transient receptor potential channel 7 (TRPM7) mediates actin dynamics imbalance through calcineurin (CaN) and cofilin cascades involved in various neurodegenerative diseases. We previously demonstrated that TRPM7 expression is increased in diabetic cognitive impairment, and troxerutin has been shown to ameliorate diabetic cognitive impairment. However, the relationship between troxerutin and TRPM7 remains unclear. In this study, we hypothesize that troxerutin may improve diabetic cognitive impairment by enhancing actin dynamics through downregulation of the TRPM7/CaN/cofilin pathway. To test this hypothesis, we divided db/m and db/db mice into the following groups: normal control group (NC), normal + troxerutin group (NT), diabetic group (DM), diabetic + troxerutin group (DT) and diabetic + troxerutin + bradykinin group (DTB). The results showed that diabetic mice exhibited cognitive impairment at 17 weeks of age, TRPM7, CaN, cofilin and G-actin were highly expressed in the CA1 region of hippocampus, while p-cofilin and F-actin expression decreased. Furthermore, hippocampal neuronal cellsshowed varying degrees of damage. The length of synaptic active zone, the width of synaptic cleft, and the number of synapses per high-power field were decreased. Troxerutin intervention alleviated these manifestations in the DT group; however, the effect of troxerutin was weakened in the DTB group. In conclusion, our findings suggest that diabetes leads to cognitive impairment, activation of the TRPM7/CaN/cofilin pathway, actin dynamics imbalance, and destruction of hippocampal neuronal cells and synapses. Troxerutin can downregulate TRPM7/CaN/cofilin, improve actin dynamics imbalance, and ameliorate cognitive impairment in diabetic mice. This study provides a new avenue for exploring and treating cognitive impairment in diabetes.