During neurotransmission, the pre-synaptic neuron releases neurotransmitters into the synaptic cleft which bind to cognate receptors expressed on the post-synaptic neuron.  Based upon the interaction between the transmitter and receptor, neurotransmitters may trigger a variety of effects in the post-synaptic cell, such as excitation, inhibition, or the initiation of second messenger cascades. Based on the cell, these effects may result in the on-site synthesis of endogenous cannabinoids anandamide or 2-AG by a process that is not entirely clear, but results from an elevation in intracellular calcium. Expression appears to be exclusive, so that both types of endocannabinoids are not co-synthesized. This exclusion is based on synthesis-specific channel activation: a recent study found that in the bed nucleus of the stria terminalis, calcium entry through voltage-sensitive calcium channels produced an L-type current resulting in 2-AG production, while activation of mGluR1/5 receptors triggered the synthesis of anandamide.
Evidence suggests that the depolarization-induced influx of calcium into the post-synaptic neuron causes the activation of an enzyme called transacylase. This enzyme is suggested to catalyze the first step of endocannabinoid biosynthesis by converting phosphatidylethanolamine, a membrane-resident phospholipid, into N-acyl-phosphatidylethanolamine (NAPE). Experiments have shown that phospholipase D cleaves NAPE to yield anandamide. This process is mediated by bile acids.
In NAPE-phospholipase D (NAPEPLD)-knockout mice, cleavage of NAPE is reduced in low calcium concentrations, but not abolished, suggesting multiple, distinct pathways are involved in anandamide synthesis. The synthesis of 2-AG is less established and warrants further research.
Once released into the extracellular space by a putative endocannabinoid transporter, messengers are vulnerable to glial cell inactivation.  Endocannabinoids are taken up by a transporter on the glial cell and degraded by fatty acid amide hydrolase (FAAH), which cleaves anandamide into arachidonic acid and ethanolamine or monoacylglycerol lipase (MAGL), and 2-AG into arachidonic acid and glycerol. While arachidonic acid is a substrate for leukotriene and prostaglandin synthesis, it is unclear whether this degradative byproduct has unique functions in the central nervous system. Emerging data in the field also points to FAAH being expressed in postsynaptic neurons complementary to presynaptic neurons expressing cannabinoid receptors, supporting the conclusion that it is major contributor to the clearance and inactivation of anandamide and 2-AG after endocannabinoid reuptake. A neuropharmacological study demonstrated that an inhibitor of FAAH (URB597) selectively increases anandamide levels in the brain of rodents and primates. Such approaches could lead to the development of new drugs with analgesic, anxiolytic-like and antidepressant-like effects, which are not accompanied by overt signs of abuse liability.