The endocannabinoid system (ECS) is a complex network of receptors, molecules, and enzymes that work together to help maintain cellular balance, or homeostasis, within our bodies. This balance allows cells, organs, and systems to function optimally. Humans and vertebrates all have an endocannabinoid system, and it has evolved within us over time.
The discovery of the endocannabinoid system in our bodies came out of an attempt by scientists to understand the effects of cannabis on the human body. Through research, it was discovered that cannabinoids exist outside of our bodies (exogenously), like THC and CBD, which are found in cannabis, and that our bodies actually produce cannabinoids of their own (endogenously).