Microglia continuously survey the brain parenchyma and actively shift status following stimulation. These processes demand a unique bioenergetic programme; however, little is known about the metabolic determinants in microglia. By mining large datasets and generating transgenic tools, here we show that hexokinase 2 (HK2), the most active isozyme associated with mitochondrial membrane, is selectively expressed in microglia in the brain. Genetic ablation of HK2 reduced microglial glycolytic flux and energy production, suppressed microglial repopulation, and attenuated microglial surveillance and damage-triggered migration in male mice. HK2 elevation is prominent in immune-challenged or disease-associated microglia. In ischaemic stroke models, however, HK2 deletion p ro mo ted n eu ro in fl am mation and potentiated cerebral damages. The enhanced inflammatory responses after HK2 ablation in microglia are associated with aberrant mitochondrial function and reactive oxygen species accumulation. Our study demonstrates that HK2 gates both glycolytic flux and mitochondrial activity to shape microglial functions, changes of which contribute to metabolic abnormalities and maladaptive inflammation in brain diseases.Metabolism has emerged as a key regulator in both innate and adaptive immunity 1 . Microglia, the primary immune cells and key guardians of brain activity in the brain, adopt different metabolic states in response to exogenous stimuli 2-4 . For example, pro-inflammatory microglia utilize aerobic glycolysis to promote synthesis of inflammatory cytokines, whereas immunomodulatory microglia in mice increase fatty acid metabolism to drive anti-inflammatory responses 2,3 . Moreover, metabolic dysfunction of microglia has been implicated in multiple diseases including Alzheimer's disease (AD) and chronic demyelination disease models [4][5][6] . Microglia deficient in triggering the receptor expressed on