E3 ubiquitination ligase XIAP lightens diabetes‐induced cognitive impairment by inactivating TXNIP‐ERS‐mediated neuronal injury. Here, TXNIP is linked to diabetes mellitus.