Diabetic encephalopathy (DE) has been defined as one of the major complications of diabetes, characterized by neurochemical and neurodegenerative changes. However, the molecular mechanism of DE are not fully elucidated at present. Here, the primary hippocampal neurons were cultured in vitro with high glucose (HG) to induce diabetes-like effects, and mice were given streptozotocin (STZ) to induce a model of type 1 diabetes mellitus (T1D) mice. The administration of sulforaphane (SF) were used to observe the protective effects on the hippocampal neurons. We found that the expression of glucose-regulated protein 78 (GRP78), a typical endoplasmic reticulum chaperone, showed a trend of increasing in the early phase but decreasing in the late phase of both HG-induced primary hippocampal neurons and T1D mice. However, SF suppressed the apoptosis induced by HG in vitro and in vivo through TUNEL assay and caspase-3 immunohistochemistry staining. Meanwhile, the administration of SF suppressed the upregulation of CHOP, Bax and p-JNK protein and the downregulation of Bcl-2 protein induced by HG in hippocampal neurons in vitro and in vivo. The caspase-12 gene was upregulated only at 4 weeks in T1D mice compared with control mice, and the upregulation was suppressed by SF. In addition, the combined administration of SF and PX12, which is an inhibitor of thioredoxin (Trx), eliminated the protective effects of SF. We conclude that HG induced the development of endoplasmic reticulum stress (ERS) in hippocampal neurons, eventually leading to the apoptosis of neurons. SF prevented the ERS and attenuates the hippocampal neuron apoptosis induced by HG both in vitro and in vivo. The underlying mechanism may be involved in the suppression of the CHOP-Bax/Bcl-2, JNK and caspase-12 signaling pathways by SF through the Trx-1 target protein.