The drosophila brain of is an exciting biological object: although it consists of a small number of neurons (about 100,000), it is highly structured and controls sophisticated behavior. Interestingly, the brain of drosophila works with the same basic components as that of mammals (neurotransmitters, receptors, signal transduction cascades, transcription factors...), and most of the molecular mechanisms underlying memory processes were preserved during evolution. Our team investigates the mechanisms of olfactory learning and memory, and we are especially interested in the mechanisms involved in the formation of long-term memory. Efficient energy use has constrained the evolution of nervous systems. However, it is unresolved whether energy metabolism may resultantly regulate major brain functions. Our observation that drosophila flies double their sucrose intake at an early stage of long-term memory formation initiated the investigation of how energy metabolism intervenes in this process. Cellular-resolution imaging of energy metabolism reveals a concurrent elevation of energy consumption in neurons of the mushroom body, the fly’s major memory center. Strikingly, upregulation of mushroom body energy flux is both necessary and sufficient to drive long-term memory formation. This effect is triggered by a specific pair of dopaminergic neurons afferent to the mushroom bodies. Hence, dopamine signaling mediates an energy switch in the mushroom body that controls long-term memory encoding. Our data thus point to an instructional role for energy flux in the execution of demanding higher brain functions.