Using a conditional retina-specific XBP1 knockout mouse line, we demonstrate that depletion of XBP1 in retinal neurons results in early onset retinal function decline, loss of retinal ganglion cells and photoreceptors, disrupted photoreceptor ribbon synapses, and Müller cell activation after induction of diabetes. Here, XBP1 is linked to diabetes mellitus.