Glucokinase (GK) and glucose-6-phosphatase (G6Pase) regulate rate-limiting reactions in the physiologically opposed metabolic cascades, glycolysis and gluconeogenesis, respectively. Expression of these genes is conversely regulated in the liver in response to fasting and feeding. We explored the mechanism of transcriptional regulation of these genes by nutritional condition and found that reciprocal function of HNF-4 and Foxo1 plays an important role in this process. In the GK gene regulation, Foxo1 represses HNF-4-potentiated transcription of the gene, whereas it synergizes with HNF-4 in activating the G6Pase gene transcription. These opposite actions of Foxo1 concomitantly take place in the cells under no insulin stimulus, and such gene-specific action was promoter context-dependent. Interestingly, HNF-4-binding elements (HBEs) in the GK and G6Pase promoters were required both for the insulin-stimulated GK gene activation and insulin-mediated G6Pase gene repression. Indeed, mouse in vivo imaging showed that mutating the HBEs in the GK and G6Pase promoters significantly impaired their reactivity to the nutritional states, even in the presence of intact Foxo1-binding sites (insulin response sequences). Thus, in the physiological response of the GK and G6Pase genes to fasting/feeding conditions, Foxo1 distinctly decodes the promoter context of these genes and differently modulates the function of HBE, which then leads to opposite outcomes of gene transcription.