Opioids are used for acute and chronic pain and dependency. They have a narrow therapeutic index and large interpatient variability in response. Genetic factors regulating their pharmacokinetics (metabolizing enzymes, transporters) and pharmacodynamics (receptors and signal transduction elements) are contributors to such variability. The polymorphic CYP2D6 regulates the O-demethylation of codeine and other weak opioids to more potent metabolites with poor metabolizers having reduced antinociception in some cases. Some opioids are P-glycoprotein substrates, whereas, ABCB1 genotypes inconsistently influence opioid pharmacodynamics and dosage requirements. Single-nucleotide polymorphisms in the mu opioid receptor gene are associated with increasing morphine, but not methadone dosage requirements and altered efficacy of mu opioid agonists and antagonists. As knowledge regarding the interplay between genes affecting opioid pharmacokinetics including cerebral kinetics and pharmacodynamics increases, our understanding of the role of pharmacogenomics in mediating interpatient variability in efficacy and side effects to this important class of drugs will be better informed. Opioid drugs as a group have withstood the test of time in their ability to attenuate acute and chronic pain. Since the isolation of morphine in the early 1800s by Friedrich Sertürner, a large number of opioid drugs beginning with modification of the 4,5-epoxymorphinan ring structure were developed in order to improve their therapeutic margin, including reducing dependence and tolerance, ultimately without success.