Opioid receptor ligands (opioids) represent the gold standard for severe pain treatment. However, approved opioids possess many serious side effects even if they are used according to medical instructions. As a result, opioid use leads to thousands of hospitalizations and deaths each year. Four different opioid receptor subtypes exist but approved opioids mainly activate the μ-opioid receptor (MOR). Activation of the κ-opioid receptor (KOR) emerged as a promising strategy to sufficiently alleviate pain while improving the side effect profile of opioids. However, KOR-related side effects and the high structural similarity of the opioid receptor subtypes renders rational drug design challenging. The opioid receptor system is not only involved in pain modulation, but also in the maintenance of mood homeostasis. Antagonism of the KOR recently emerged as a promising strategy for the development of novel antidepressants with fast-onset antidepressant effects that are also effective against suicidal intent. However, the chemical space of KOR selective antagonists is limited. No short-acting and selective KOR antagonists have been approved so far. This dissertation encompasses retrospective and prospective studies that focus on in silico techniques to address current questions in opioid research. The first three articles, conducted retrospective in silico analyses of HS-731, an opioid agonist, Compound A, a KOR/MOR dual antagonist, and Salvinorin A (SalA), a non-basic, KOR-selective agonist. These analyses aimed to improve our limited understanding of the factors that determine opioid receptor activity and selectivity. The investigated compounds are of high pharmacological interest. HS-731 represents an analgesic with a potentially improved safety profile due to its exclusion from the central nervous system (CNS). Compound A has a unique scaffold that may overcome the unfavorable kinetic profile of current antidepressant opioids. SalA represents a non-basic agonist with exceptional KOR selectivity that potentially binds dissimilar to basic opioids at the KOR. Protein-ligand binding modes of the compounds at the opioid receptor subtypes were predicted and selectivity determinants rationalized. Important protein-ligand interactions responsible for the opioid receptor activity of these ligands were highlighted. A new binding site for SalA above the typical morphinan binding site that is highly non-conserved was discovered. The SalA binding mode is consistent with structure-activity relationship (SAR) data and rationalizes the exceptional receptor subtype selectivity of SalA at the KOR. In addition, a partial agonism-inducing mechanism for the KOR was hypothesized involving an interaction between the extracellular oriented parts of the transmembrane helices 5 and 6. Typical opioids possess a basic amine moiety interacting with a conserved aspartate residue inside the binding site. Since the discover of non-basic and highly KOR-selective SalA, the design of non-basic opioids became a new and promising strategy for the selective activation of the KOR, circumventing MOR-associated severe side effects. However, the number of known non-basic opioids is strongly limited and rational drug design of new non-basic opioids is the hindered by the lack of understanding about the binding mode of SalA. In the fourth article included in this dissertation, a prospective 3D pharmacophore-based virtual screening campaign was conducted. The campaign was based on the SalA binding mode postulated in the third article. The aim was to determine new non-basic and selective KOR ligands. Pharmacological in vitro experiments confirmed two of the suggested compounds to activate the KOR with nanomolar potency and good subtype selectivity. One hit compound possesses a full agonistic and one compound shows a partial agonistic profile at the KOR. Both hit compounds share a novel spiro-moiety-containing scaffold. Overall, the findings of this dissertation provide new mechanistic insights into opioid receptor activation in the context of current progress in structural biology, and lay the basis for improved, rational drug design of safer analgesics and novel antidepressants with KOR activity.