Endogenous cannabinoid ligands (endocannabinoids) produced by neurons, astrocytes, and microglial cells activate cannabinoid receptors, the molecular target for marijuana's bioactive ingredient Δ9-tetrahydrocannabinol. The molecular mechanism underlying the production of the most abundant endocannabinoid, 2-arachidonoylglycerol (2-AG), is unclear. A prevalent hypothesis proposes that activation of metabotropic receptors coupled to the phosphatidylinositol-specific phospholipase C and diacylglycerol (DG) lipase pathway will systematically lead to increases in 2-AG production. Here, we show that ATP increases 2-AG production by cultured microglial cells in a phosphatidylinositol-specific phospholipase C and DG lipase-dependent manner. However, efficacious activation of metabotropic P2Y purinergic receptors coupled to phosphatidylinositol-specific phospholipase C does not increase 2-AG production. This suggests that ionotropic, and not metabotropic, purinergic receptors control 2-AG production at an unexpected enzymatic step of its metabolic pathway. We show that activation of P2X7 ionotropic receptors, which are highly permeable to calcium, is necessary and sufficient to increase 2-AG production in microglial cells. We also show that the sustained rise in intracellular calcium induced by activation of P2X7 receptors directly increases DG lipase activity while inhibiting the activity of monoacylglycerol lipase, the enzyme that degrades 2-AG. This inverse sensitivity of DG lipase and monoacylglycerol lipase to calcium constitutes an original and efficient modality for sustained accumulation of 2-AG. Because prolonged increases in 2-AG amounts in brain parenchyma are thought to orchestrate neuroinflammation, the enzymatic steps involved in 2-AG synthesis and degradation by microglial cells constitute appealing targets for therapy aimed at controlling exacerbated neuroinflammation.