Narcotic analgesics such as morphine have been the mainstay for the treatment of severe pain, although these drugs are associated with serious adverse effects, most notably addiction liability and respiratory depression. Therefore there has been an intensive effort to find new therapeutic agents that retain the effectiveness of morphine, but do not have its undesired side effects. Compounds have been identified from a wide variety of chemical classes, from the rigid morphinan alkaloids to the flexible phenylpiperidines and the opioid peptides, which have affinity for opioid receptors. In recent years considerable effort has focused on identifying ligands, both agonists and antagonists, with affinity for delta (δ) and kappa (κ) opioid receptors as pharmacological tools and as potential therapeutic agents that would not have the side‐effect profile of morphine and other agonists that interact with mu (μ) opioid receptors. After the identification of the closely related opioid receptor‐like (ORL1) receptor and its endogenous ligand orphanin FQ/nociceptin, there has been considerable effort directed toward identifying agonists and antagonists for this receptor as well. This review discusses the structure‐activity relationships for each of the major classes of compounds that interact with the opioid receptors, along with ligands for the ORL1 receptors.