Autophagy is a process that maintains homeostasis during stress, although it also contributes to cell death under specific contexts. Ceramides have emerged as important effectors in the regulation of autophagy, mediating the crosstalk with apoptosis. Melatonin induces apoptosis of cancer cells; however, its role in autophagy and ceramide metabolism has yet to be clearly elucidated. This study was aimed to evaluate the effect of melatonin administration on autophagy and ceramide metabolism and its possible link with melatonin-induced apoptotic cell death in hepatocarcinoma (HCC) cells. Melatonin (2 mm) transiently induced autophagy in HepG2 cells through JNK phosphorylation, characterized by increased Beclin-1 expression, p62 degradation, and LC3II and LAMP-2 colocalization, which translated in decreased cell viability. Moreover, ATG5 silencing sensitized HepG2 cells to melatonin-induced apoptosis, suggesting a dual role of autophagy in cell death. Melatonin enhanced ceramide levels through both de novo synthesis and acid sphingomyelinase (ASMase) stimulation. Serine palmitoyltransferase (SPT) inhibition with myriocin prevented melatonin-induced autophagy and ASMase inhibition with imipramine-impaired autophagy flux. However, ASMase inhibition partially protected HepG2 cells against melatonin, while SPT inhibition significantly enhanced cell death. Findings suggest a crosstalk between SPT-mediated ceramide generation and autophagy in protecting against melatonin, while specific ASMase-induced ceramide production participates in melatonin-mediated cell death. Thus, dual blocking of SPT and autophagy emerges as a potential strategy to potentiate the apoptotic effects of melatonin in liver cancer cells.