Objectives: Memory decline caused by insufficient sleep is a critical public health issues and currently lacks effective treatments. This study objective was to explore alleviative effect of melatonin on sleep deprivation (SD)-induced deficiencies in learning and memory.Materials and Methods: A continuous 72 h SD mouse model, with or without melatonin or Fer-1 supplementation were established. The changes of cognitive function, iron homeostasis, lipid peroxidation and intracellular signal pathways in mice were detected by Morris water maze, antioxidant assay, immunohistochemistry, western blot, RT-PCR and Prussian blue staining. In vitro, we treated HT-22 cells with ferroptosis inducer (Erastin) to further explore the specific mechanism of melatonin in ferroptosis.Results: Mice subjected to SD had significantly elevated latency and path length to reach hidden platform, as well as a decrease in number of entries and time spent in the target zone when the hidden platform was removed (p < 0.05). Nevertheless, supplementation with ferroptosis inhibitor (Fer-1) mitigated the memory impairment associated with SD. Further evaluation revealed an up-regulation of intracellular iron accumulation, transferrin receptor 1 and divalent metal transporter 1 expression and ROS and MDA production, and a down-regulation of ferroportin and antioxidant enzyme (GPX4 and SOD) expression in SD mice. SD decreased expression of MT2 receptor rather than of MT1, and inhibited ERK/Nrf2 signaling activation in the hippocampus (p < 0.05). In contrast, the aforementioned SD-inductions were reversed by supplementation using 20 and 40 mg/kg melatonin in SD mice. In vitro, melatonin pretreatment reversed Erastin-induced ferroptosis, abnormalities in iron transporter protein and antioxidant enzyme expression and suppression of ERK/Nrf2 signaling in HT-22 cells, however this protective effect of melatonin was blocked by MT2-, ERK- and Nrf2-specific antagonists (p < 0.05).Conclusion: Our finding suggested SD may induce ferroptosis, in turn leading to cognitive deficits. Melatonin alleviated memory loss and hippocampal ferroptosis caused by acute SD through binding to the MT2 receptor to activate ERK/Nrf2 signaling.