Microglia are highly motile cells that continuously monitor the brain environment and respond to damage-associated cues. While glucose is the main energy substrate used by neurons in the brain, the nutrients metabolized by microglia to support surveillance of the parenchyma remain unexplored. Here, we use fluorescence lifetime imaging of intracellular NAD(P)H and time-lapse two-photon imaging of microglial dynamics in vivo and in situ, to show unique aspects of the microglial metabolic signature in the brain. Microglia are metabolically flexible and can rapidly adapt to consume glutamine as an alternative metabolic fuel in the absence of glucose. During insulin-induced hypoglycemia in vivo or in aglycemia in acute brain slices, glutaminolysis supports the maintenance of microglial process motility and damage-sensing functions. This metabolic shift sustains mitochondrial metabolism and requires mTOR-dependent signaling. This remarkable plasticity allows microglia to maintain their critical surveillance and phagocytic roles, even after brain neuroenergetic homeostasis is compromised.