Control of brain energy metabolism and regulation of synaptic activity through gliotransmission are two important ways, through which astrocytes contribute to mental functions. However, the potential functional and molecular links between these two astrocyte-dependent processes have been scantly explored so far. Here we show that a lactate-dependent shift of glycolysis underlies the production of the gliotransmitter D-serine by acute activation of astrocyte type-1 cannabinoid (CB1) receptors, thereby gating synaptic and cognitive processes. Acute cannabinoid application causes a CB1 receptor-dependent rapid and reversible increase of lactate production and release in primary astrocyte cultures. As shown before, mutant mice lacking the CB1 receptor gene in astrocytes (GFAP-CB1-KO) were impaired in a novel object recognition (NOR) task. Notably, this phenotype was rescued not only by the gliotransmitter D-serine, but also by its precursor L-serine. Surprisingly, the administration of lactate also reverted the memory impairment of GFAP-CB1-KO mice. This rescue effect was abolished by in vivo blockade of the astrocyte-specific phosphorylated pathway (PP), which diverts glycolysis towards L-serine synthesis, suggesting that lactate itself might promote the accumulation of this amino acid. Consistent with this idea, lactate increased the co-agonist occupancy of CA1 post-synaptic hippocampal NMDA receptors in a PP-dependent manner. By establishing a mechanistic link between lactate, serine availability, synaptic activity and behavior, these results reveal an unforeseen functional connection between energy metabolism and gliotransmission to control cognitive processes.