Oxycodone is metabolized by CYP2D to oxymorphone. Despite oxymorphone being a more potent opioid-receptor agonist, its contribution to oxycodone analgesia may be minor because of low peripheral production, low blood–brain barrier permeability and central nervous system efflux. CYP2D metabolism within the brain may contribute to variation in central oxycodone and oxymorphone levels, thereby affecting analgesia. Brain CYP2D expression and activity are subject to exogenous regulation; nicotine induces rat brain, but not liver, CYP2D consistent with higher brain CYP2D in smokers. We assessed the role of rat brain CYP2D in orally administered oxycodone metabolism (in vivo brain microdialysis) and analgesia (tail-flick test) by inhibiting brain CYP2D selectively with intracerebroventricular propranolol (mechanism-based inhibitor) and inducing brain CYP2D with nicotine. Inhibiting brain CYP2D increased brain oxycodone levels (1.8-fold; P < 0.03) and analgesia (1.5-fold AUC0–60; P < 0.001) after oxycodone, while inducing brain CYP2D increased brain oxymorphone levels (4.6-fold; P < 0.001) and decreased analgesia (0.8-fold; P < 0.02). Inhibiting the induced brain CYP2D reversed the change in oxycodone levels (1.2-fold; P > 0.1) and analgesia (1.1-fold; P > 0.3). Brain, but not plasma, metabolic ratios were affected by pre-treatments. Peak analgesia was inversely correlated with ex vivo brain (P < 0.003), but not hepatic (P > 0.9), CYP2D activity. Altering brain CYP2D did not affect analgesia from oral oxymorphone (P > 0.9 for AUC0–60 across all groups), which is not a CYP2D substrate. Thus, brain CYP2D metabolism alters local oxycodone levels and response, suggesting that people with increased brain CYP2D activity may have reduced oxycodone response. Factors that alter individual oxycodone response may be useful for optimizing treatment and minimizing abuse liability.