Palmitic acid (PA), the main component of dietary saturated fat, has been known to increase in patients with obesity, and PA-induced lipotoxicity may contribute to obesity-related male infertility. Melatonin has beneficial effects on reproductive processes; however, the effect and the underlying molecular mechanism of melatonin's involvement in PA-induced cytotoxicity in the testes are poorly understood. Our findings showed that lipotoxicity was observed in mouse testes after long-term PA treatment and that melatonin therapy restored spermatogenesis and fertility in these males. Moreover, melatonin therapy suppressed PA-induced apoptosis by modulating apoptosis-associated proteins such as Bcl2, Bax, C-Caspase3, C-Caspase12, and CHOP in type B spermatogonial stem cells. Changes in the expression of endoplasmic reticulum (ER) stress markers (p-IRE1, p-PERK, ATF4) and intracellular Ca 2+ levels showed that melatonin relieved PA-induced ER stress. Mechanistically, melatonin stimulated the expression and nuclear translocation of SIRT1 through its receptors and prevented PA-induced ROS production and mitochondrial dysfunction via SIRT1 signaling pathway. Furthermore, melatonin promoted SIRT1-mediated p53 deacetylation, thereby relieving G2/M arrest in response to PA-stimulated DNA damage. Collectively, these findings indicate that melatonin protects the testes from PA-induced lipotoxicity through the activation of SIRT1, which alleviates oxidative stress, ER stress, mitochondrial dysfunction, and DNA damage.