Morphine is part of a class of drugs called opiate (narcotic) analgesics, or opioid agonists, which block the transmission of pain signals to the brain by binding to nervous system proteins called opioid receptors.Morphine is also sometimes prescribed off label to treat pain in hospitalized children.: Morphine is a medication that is used for pain management and is in the class of medications called opioid narcotics. Opioids act by attaching to specific proteins called opioid receptors, which are found in the brain, spinal cord, and gastrointestinal tract.