"chemical which occurs naturally in the brain and works like morphine," 1975, from French endorphine. First element from endogène "endogenous, growing within" (see endo- + genus); second element from morphine.
(Latin plural genera), 1550s as a term of logic, "kind or class of things" (biological sense dates from c. 1600), from Latin genus (genitive generis) "race, stock, kind; family, birth, descent, origin" (from suffixed form of PIE root *gene- "give birth, beget," with derivatives referring to procreation and familial and tribal groups).
chief alkaloid of opium (used as a narcotic pain-killer), 1828, from French morphine or German Morphin (1816), name coined by German apothecary Friedrich Sertürner (1783-1840) in reference to Latin Morpheus (q.v.), Ovid's name for the god of dreams, from Greek morphē "form, shape, beauty, outward appearance," which is of unknown origin. So called because of the drug's sleep-inducing properties.
<a href="https://www.etymonline.com/word/endorphin">Etymology of endorphin by etymonline</a>
Harper, D. (n.d.). Etymology of endorphin. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/endorphin