Recent studies have demonstrated that dihydromyricetin (DHM) exerts a protective effect against central nervous system injury. Building on these findings, the present study aimed to investigate whether DHM could ameliorate cognitive deficits in a type 2 diabetes mellitus (T2DM) rat model, and to explore whether this effect involved inhibition of the JNK signaling pathway and suppression of endoplasmic reticulum stress (ERS). To establish the T2DM model, Sprague Dawley (SD) rats were fed a high-fat, high-sugar diet in combination with a single intraperitoneal injection of streptozotocin (STZ). Fasting blood glucose levels were measured from tail vein samples, and cognitive performance was evaluated using the Morris water maze (MWM) and Y-maze tests. Following behavioral assessments, the animals were sacrificed by cervical dislocation, and hippocampal tissues were collected for further analysis. Histological examination using hematoxylin-eosin (H&E) staining was performed to assess hippocampal neuronal damage. Western blotting (WB) analysis was employed to quantify the expression of pro-apoptotic protein Bax and anti-apoptotic protein Bcl-2, while ELISA was conducted to measure levels of phosphorylated tau (p-tau) and amyloid-β (Aβ) in the hippocampus. After 12 weeks of oral administration of DHM (250 mg/kg/d), relevant biomarkers were re-evaluated to determine the compound's impact on cognitive function and hippocampal integrity. Additionally, rats from each group received intracerebroventricular injections of various pharmacological agents, namely, TUDCA (an ERS inhibitor), STZ, SP600125 (a JNK inhibitor), and anisomycin (AMY, a JNK activator). WB analysis was further conducted to assess the expression of JNK, phosphorylated JNK (p-JNK), and ERS-associated proteins Bip and p-PERK in hippocampal tissue. The results confirmed that combining a high-fat, high-sugar diet with low-dose STZ injection for 4 weeks effectively established a T2DM model. Compared with the control group, T2DM rats exhibited significant cognitive deficits, increased neuronal apoptosis in the hippocampus, and elevated hippocampal levels of p-tau and Aβ. Notably, DHM treatment markedly reversed these pathological changes in T2DM rats, whereas it had no significant effects on control animals. Moreover, administration of TUDCA and SP600125 similarly mitigated cognitive impairment, neuronal apoptosis, and the accumulation of p-tau and Aβ in diabetic rats. Conversely, activation of ERS and JNK signaling using tunicamycin (TUN) and AMY, respectively, resulted in exacerbated cognitive decline, increased neuronal apoptosis, and higher levels of p-tau and Aβ. In conclusion, these findings suggested that DHM effectively alleviated cognitive dysfunction in T2DM rats, potentially through the inhibition of JNK signaling and subsequent attenuation of ERS, thereby reducing neuronal apoptosis and the pathological accumulation of p-tau and Aβ in the hippocampus.