Morphine is primarily metabolized in the liver by conjugation to morphine-3-glucuronide and morphine-6-glucuronide. These metabolites are then excreted through the kidneys. The presence of these metabolites can be detected in urine, making drug testing possible for morphine use.