Diabetes is a group of metabolic disorders with an increased risk of developing cognitive impairment and dementia. The hippocampus in the forebrain contains an abundance of insulin receptors related to cognitive function and plays an important role in the pathophysiology of neurodegenerative disorders. Berberine from traditional Chinese medicine has been used to treat diabetes and diabetic cognitive impairment, although its related mechanisms are largely unknown. In this study, a STZ diabetes rat model feeding with a high-fat diet was used to test the effects of berberine compared with metformin. Oral glucose tolerance and hyperinsulinemic-euglycemic clamp were used for glucose metabolism and insulin resistance. The Morris water maze was used to observe the compound effects on cognitive impairment. Serum and hippocampal [Formula: see text]-amyloid peptide (A[Formula: see text], Tau and phosphorylated Tau protein deposition in the hippocampi were measured. The TUNEL assay was used to detect the neuronal apoptosis, supported by histomorphological changes and transmissional electron microscopy (TEM) image. Our data showed that the diabetic rats had a significantly cognitive impairment. In addition to improving glucose metabolism and reducing insulin resistance, berberine significantly improved the cognitive function in the rat. Berberine also effectively decreased the expression of hippocampal tau protein, phosphorylated Tau, and increased insulin receptor antibodies. Moreover, berberine downregulated the abnormal phosphorylation of A[Formula: see text] and Tau protein and improved hippocampal insulin signaling. The TUNEL assay confirmed that berberine reduced hippocampal neuronal apoptosis supported by TEM. Thus, berberine significantly improved the cognitive function in diabetic rats by changing the peripheral and central insulin resistance. The reduction of neuronal injury, A[Formula: see text] deposition, abnormal phosphorylation of Tau protein, and neuronal apoptosis in the hippocampus were observed as the related mechanisms of action.