Melatonin ameliorates fasting- and diabetes-mediated induction of hepatic gluconeogenesis via the stimulation of the SESN2-SHP cascade. Here, SESN2 is linked to diabetes mellitus.