The endoplasmic reticulum (ER) is crucial for protein quality control, and disruptions in its function can lead to various diseases. ER stress triggers an adaptive response called the unfolded protein response (UPR), which can either restore cellular homeostasis or induce cell death. Melatonin, a safe and multifunctional compound, shows promise in controlling ER stress and could be a valuable therapeutic agent for managing the UPR. By regulating ER and mitochondrial functions, melatonin helps maintain cellular homeostasis via reduction of oxidative stress, inflammation, and apoptosis. Melatonin can directly or indirectly interfere with ER‐associated sensors and downstream targets of the UPR, impacting cell death, autophagy, inflammation, molecular repair, among others. Crucially, this review explores the mechanistic role of melatonin on ER stress in various diseases including liver damage, neurodegeneration, reproductive disorders, pulmonary disease, cardiomyopathy, insulin resistance, renal dysfunction, and cancer. Interestingly, while it alleviates the burden of ER stress in most pathological contexts, it can paradoxically stimulate ER stress in cancer cells, highlighting its intricate involvement in cellular homeostasis. With numerous successful studies using in vivo and in vitro models, the continuation of clinical trials is imperative to fully explore melatonin's therapeutic potential in these conditions.