Intracellular galectins are carbohydrate-binding proteins capable of sensing and repairing damaged lysosomes. As in the physiological conditions glycosylated moieties are mostly in the lysosomal lumen but not cytosol, it is unclear whether galectins reside in lysosomes, bind to glycosylated proteins, and regulate lysosome functions. Here, we show in gut epithelial cells, galectin-9 is enriched in lysosomes and predominantly binds to lysosome-associated membrane protein 2 (Lamp2) in a Asn(N)-glycan dependent manner. At the steady state, galectin-9 binding to glycosylated Asn175 of Lamp2 is essential for functionality of lysosomes and autophagy. Loss of N-glycan-binding capability of galectin-9 causes its complete depletion from lysosomes and defective autophagy, leading to increased endoplasmic reticulum (ER) stress preferentially in autophagy-active Paneth cells and acinar cells. Unresolved ER stress consequently causes cell degeneration or apoptosis that associates with colitis and pancreatic disorders in mice. Therefore, lysosomal galectins maintain homeostatic function of lysosomes to prevent organ pathogenesis.