The liver has a central role in glucose homeostasis, as it has the distinctive ability to produce and consume glucose. On feeding, glucose influx triggers gene expression changes in hepatocytes to suppress endogenous glucose production and convert excess glucose into glycogen or fatty acids to be stored in adipose tissue. This process is controlled by insulin, although debate exists as to whether insulin acts directly or indirectly on the liver. In addition to stimulating pancreatic insulin release, glucose also regulates the activity of ChREBP, a transcription factor that modulates lipogenesis. Here we describe another mechanism whereby glucose determines its own fate: we show that glucose binds and stimulates the transcriptional activity of the liver X receptor (LXR), a nuclear receptor that coordinates hepatic lipid metabolism. d-Glucose and d-glucose-6-phosphate are direct agonists of both LXR-alpha and LXR-beta. Glucose activates LXR at physiological concentrations expected in the liver and induces expression of LXR target genes with efficacy similar to that of oxysterols, the known LXR ligands. Cholesterol homeostasis genes that require LXR for expression are upregulated in liver and intestine of fasted mice re-fed with a glucose diet, indicating that glucose is an endogenous LXR ligand. Our results identify LXR as a transcriptional switch that integrates hepatic glucose metabolism and fatty acid synthesis.