Endogenous cannabinoids (endocannabinoids) are small molecules biosynthesized from membrane glycerophospholipid. Anandamide (AEA) is an endogenous intestinal cannabinoid that controls appetite and energy balance by engagement of the enteric nervous system through cannabinoid receptors. Here, we uncover a role for AEA and its receptor, cannabinoid receptor 2 (CB2), in the regulation of immune tolerance in the gut and the pancreas. This work demonstrates a major immunological role for an endocannabinoid. The pungent molecule capsaicin (CP) has a similar effect as AEA; however, CP acts by engagement of the vanilloid receptor TRPV1, causing local production of AEA, which acts through CB2. We show that the engagement of the cannabinoid/vanilloid receptors augments the number and immune suppressive function of the regulatory CX3CR1(hi) macrophages (M.), which express the highest levels of such receptors among the gut immune cells. Additionally, TRPV1(-/-) or CB2(-/-) mice have fewer CX3CR1hi M. in the gut. Treatment of mice with CP also leads to differentiation of a regulatory subset of CD4(+) cells, the Tr1 cells, in an IL-27-dependent manner in vitro and in vivo. In a functional demonstration, tolerance elicited by engagement of TRPV1 can be transferred to naIve nonobese diabetic (NOD) mice [model of type 1 diabetes (T1D)] by transfer of CD4(+) T cells. Further, oral administration of AEA to NOD mice provides protection from T1D. Our study unveils a role for the endocannabinoid system in maintaining immune homeostasis in the gut/pancreas and reveals a conversation between the nervous and immune systems using distinct receptors.