p53 regulates several signaling pathways to maintain the metabolic homeostasis of cells and modulates the cellular response to stress. Deficiency or excess of nutrients causes cellular metabolic stress, and we hypothesized that p53 could be linked to glucose maintenance. We show here that upon starvation hepatic p53 is stabilized by O-GlcNAcylation and plays an essential role in the physiological regulation of glucose homeostasis. More specifically, p53 binds to PCK1 promoter and regulates its transcriptional activation, thereby controlling hepatic glucose production. Mice lacking p53 in the liver show a reduced gluconeogenic response during calorie restriction. Glucagon, adrenaline and glucocorticoids augment protein levels of p53, and administration of these hormones to p53 deficient human hepatocytes and to liver-specific p53 deficient mice fails to increase glucose levels. Moreover, insulin decreases p53 levels, and over-expression of p53 impairs insulin sensitivity. Finally, protein levels of p53, as well as genes responsible of O-GlcNAcylation are elevated in the liver of type 2 diabetic patients and positively correlate with glucose and HOMA-IR. Overall these results indicate that the O-GlcNAcylation of p53 plays an unsuspected key role regulating in vivo glucose homeostasis.