Background and Objective: The analgesic effect of codeine depends on the formation of the opioid metabolites morphine and morphine-6-glucuronide. Different factors have been shown or suspected to affect the safety and efficacy of codeine treatment. The objective of the current study is to assess and quantify the impact of important pharmacokinetic factors, using a mechanistic modeling approach. Methods: By means of a generic modeling approach integrating prior physiologic knowledge, we systematically investigated the complex dependence of opioid exposure on cytochrome P450 2D6 and 3A4 (CYP2D6 and CYP3A4), and uridine diphosphate glucuronosyltransferase 2B7 (UGT2B7) activity, as well as renal function, by means of a virtual clinical trial. Results: First, the known dominant role of CYP2D6 activity for morphine exposure was reproduced. Second, the model demonstrated that mild and moderate renal impairment and co-administration of CYP3A4 inhibitors have only minor influences on opioid exposure. Third, the model showed — in contrast to current opinion — that increased UGT2B7 activity is associated with a decrease in active opioid exposure. Conclusion: Overall, the model-based analysis predicts a wide range of morphine levels after codeine administration and supports recent doubts about safe and efficacious use of codeine for analgesia in non-genotyped individuals.