Diabetes mellitus is associated with rapid cognitive decline. Currently, there is no effective treatment for cognitive dysfunction induced by diabetes. l-3-n-Butylphthalide (L-NBP) is a nerve protective drug extracted from seeds of celery, which has been proved to improve learning and memory in vascular dementia animal models by improving microcirculation, protecting mitochondria and increasing long-term potentiation (LTP). NR2B, one of the subunits of N-methyl-d-aspartate receptor, has been proved to be an important factor for the formation of LTP. The study aimed to investigate the role of NR2B in cognitive dysfunction in the rats with type 1 diabetes and define the protective effects of L-NBP on cognition. A rat model of type 1 diabetes was established by a single intraperitoneal injection of streptozotocin at 60 mg/kg. Animals were randomly allocated to four groups: normal control (NC); diabetic control (DC); diabetic + low L-NBP (DL, administered L-NBP 60 mg/kg per day for 12 weeks); and diabetic + high L-NBP (DH, administered L-NBP 120 mg/kg per day, for 12 weeks). After 12 weeks, cognitive and memory changes were investigated in the Morris water maze. The expression of NR2B was assessed by real-time polymerase chain reaction, Western blotting, and immunohistochemistry. Our results indicated that the escape latency was significantly increased and the number of crossing platform was significantly decreased in DC group compared to NC group. Also, the expression of NR2B was significantly declined in DC group. However, compared to DC group, the expression of NR2B of the L-NBP-treated groups was significantly increased and the escape latency was shortened with the DH group being the most obvious. Therefore, L-NBP can improve the cognitive function by up-regulating the expression of NR2B in STZ-diabetic rats, which may provide the direction for future diabetic encephalopathy therapy.