Neuronal function is highly energy demanding and thus requires efficient and constant metabolite delivery. Like their mammalian counterparts Drosophila glia are highly glycolytic and provide lactate to fuel neuronal metabolism. However, flies are able to survive for several weeks in the absence of glial glycolysis1. Here, we study how glial cells maintain sufficient nutrient supply to neurons under conditions of carbohydrate restriction. We show that glycolytically impaired glia switch to fatty acid breakdown via β-oxidation and provide ketone bodies as an alternate neuronal fuel. Moreover, flies also rely on glial β-oxidation under starvation conditions with glial loss of β-oxidation increasing susceptibility to starvation. Further, we show that glial cells act as a metabolic sensor in the brain and can induce mobilization of peripheral energy stores to ensure brain metabolic homeostasis. In summary, our study gives pioneering evidence on the importance of glial β-oxidation and ketogenesis for brain function, and survival, under adverse conditions, like malnutrition. The glial capacity to utilize lipids as an energy source seems to be conserved from flies to humans.