Narcotics Family Tree
Sometimes it is instructive to see how all the different narcotics are related to each other. It may surprise people that when a narcotic is swallowed, it often will be converted to another different narcotic by the body.
For example, both codeine and heroin are metabolized by the liver into morphine which is the actual "active" metabolite resulting in pain relief. Codeine is also converted into hydrocodone which is the narcotic contained in vicodin and norco.
Morphine, oxycodone, fentanyl, and methadone do not get metabolized into alternative forms.
Although most narcotics are metabolized by the liver, most are excreted from the body by the kidneys.
So now you know!
Opioid Metabolism. Mayo Clin Proc. 2009 Jul; 84(7): 613–624.