Opioid receptors mediate the actions of endogenous and exogenous opioids on many physiological processes, including the regulation of pain, respiratory drive, mood, and--in the case of κ-opioid receptor (κ-OR)--dysphoria and psychotomimesis. Here we report the crystal structure of the human κ-OR in complex with the selective antagonist JDTic, arranged in parallel dimers, at 2.9 Å resolution. The structure reveals important features of the ligand-binding pocket that contribute to the high affinity and subtype selectivity of JDTic for the human κ-OR. Modelling of other important κ-OR-selective ligands, including the morphinan-derived antagonists norbinaltorphimine and 5'-guanidinonaltrindole, and the diterpene agonist salvinorin A analogue RB-64, reveals both common and distinct features for binding these diverse chemotypes. Analysis of site-directed mutagenesis and ligand structure-activity relationships confirms the interactions observed in the crystal structure, thereby providing a molecular explanation for κ-OR subtype selectivity, and essential insights for the design of compounds with new pharmacological properties targeting the human κ-OR.