An opioid analgesic (also known as a narcotic analgesic) is a drug used in the treatment of pain that acts on specific receptors within the CNS. Drugs in this classification include codeine (a moderately potent analgesic) and morphine (a potent one).