Diabetic cognitive dysfunction (DCD) has attracted increased attention, but its precise mechanism remains to be explored. Oligodendrocytes form myelin sheaths that wrap around axons. Granzyme B (GZMB) can cause axonal degeneration of the central nervous system. However, the role of GZMB in diabetic cognitive dysfunction (DCD) has not been reported. This study aimed to investigate whether GZMB promotes demyelination and participates in DCD by regulating the endoplasmic reticulum stress function of oligodendrocytes METHODS: Streptozotocin was injected intraperitoneally to establish a diabetic model in C57BL/6 mice. The mice were randomly divided into four groups: control group, diabetic group, diabetic + SerpinA3N group, and diabetic + saline treatment group. We performed the Morris water maze test to assess the learning and memory abilities of the mice. An immunofluorescence assay was performed to detect the expression sites of GZMB and OLIG2 in the hippocampal CA1 region. Luxol Fast Blue staining and electron microscopy were performed to detect the myelin number and myelin plate densities. Immunohistochemistry was used to detect the expression levels of MBP and CNPase. Protein blotting was used to assess the expression levels of GZMB, PERK, p-PERK, eIF2α, p-eIF2α, NLRP3, Caspase-1, GSDMD-N, IL-1β, and IL-18 as well as MBP and CNPase.