The endocannabinoid arachidonoyl ethanolamine (anandamide) is a lipid transmitter synthesized and released "on demand" by neurons in the brain. Anandamide is also generated by macrophages where its endotoxin (LPS)-induced synthesis has been implicated in the hypotension of septic shock and advanced liver cirrhosis. Anandamide can be generated from its membrane precursor, N-arachidonoyl phosphatidylethanolamine (NAPE) through cleavage by a phospholipase D (NAPE-PLD). Here we document a biosynthetic pathway for anandamide in mouse brain and RAW264.7 macrophages that involves the phospholipase C (PLC)-catalyzed cleavage of NAPE to generate a lipid, phosphoanandamide, which is subsequently dephosphorylated by phosphatases, including PTPN22, previously described as a protein tyrosine phosphatase. Bacterial endotoxin (LPS)-induced synthesis of anandamide in macrophages is mediated exclusively by the PLC/phosphatase pathway, which is up-regulated by LPS, whereas NAPE-PLD is down-regulated by LPS and functions as a salvage pathway of anandamide synthesis when the PLC/phosphatase pathway is compromised. Both PTPN22 and endocannabinoids have been implicated in autoimmune diseases, suggesting that the PLC/phosphatase pathway of anandamide synthesis may be a pharmacotherapeutic target.