The fasting-activated longevity protein sirtuin 1 (SirT1, ref. 1) promotes gluconeogenesis in part, by increasing transcription of the key gluconeogenic genes pepck1 and g6pase, through deacetylating PGC-1alpha and FOXO1 (ref. 4). In contrast, signal transducer and activator of transcription 3 (STAT3) inhibits glucose production by suppressing expression of these genes. It is not known whether the inhibition of gluconeogenesis by STAT3 is controlled by metabolic regulation. Here we show that STAT3 phosphorylation and function in the liver were tightly regulated by the nutritional status of an animal, through SirT1-mediated deacetylation of key STAT3 lysine sites. The importance of the SirT1-STAT3 pathway in the regulation of gluconeogenesis was verified in STAT3-deficient mice in which the dynamic regulation of gluconeogenic genes by nutritional status was disrupted. Our results reveal a new nutrient sensing pathway through which SirT1 suppresses the inhibitory effect of STAT3, while activating the stimulatory effect of PGC-1alpha and FOXO1 on gluconeogenesis, thus ensuring maximal activation of gluconeogenic gene transcription. The connection between acetylation and phosphorylation of STAT3 implies that STAT3 may have an important role in other cellular processes that involve SirT1.