Caffeine has been identified to have beneficial effects against chronic liver diseases, particularly liver fibrosis. Many studies have reported that caffeine ameliorates liver fibrosis by directly inducing hepatic stellate cell (HSC) apoptosis; however, the molecular mechanisms involved in this process remain unclear. The presents study aimed to detect the underlying mechanisms by which caffeine mediates HSC apoptosis and eliminates activated HSCs. For this purpose, the LX-2 cell line was applied in this study and the cells were exposed to various concentrations of caffeine for the indicated times. The effects of caffeine on cell viability and apoptosis were assessed by Cell Counting Kit-8 assay and flow cytometry, respectively. Autophagy and endoplasmic reticulum (ER) stress were explored by morphological assessment and western blotting. In the present study, caffeine was found to inhibit the viability and increase the apoptosis of the LX-2 cells in dose- and time-dependent manners. ER stress was stimulated by caffeine as demonstrated by increased levels of GRP78/Bip, CHOP and inositol‑requiring enzyme 1 (IRE1)-α as well as many enlarged ERs detected by electron microscopy. Caffeine induced autophagy as shown by increased p62 and LC3Ⅱ accumulation and the number of GFP/RFP-LC3 puncta and autophagosomes/autolysosomes. Moreover, IRE1-α knockdown decreased the level of autophagic flux, and inhibition of autophagy protected LX-2 cells from apoptotic death. In conclusion, our study showed that the caffeine-enhanced autophagic flux in HSCs was stimulated by ER stress via the IRE1-α signaling pathway, which further weakened HSC viability via the induction of apoptosis. These findings provide new insight into the mechanism of caffeine's anti-fibrotic effects.