Interindividual variability in analgesic response is at least partly due to well-characterized polymorphisms that are associated with opioid dosing and adverse outcomes. The Clinical Pharmacogenetics Implementation Consortium (CPIC) has put forward recommendations for the phenotype, but the list of studied drug-gene pairs continues to grow. This clinical trial randomized chronic pain patients ( = 60), referred from primary care to pain unit care into two opioid prescribing arms, one guided by , μ-opioid receptor (), and catechol-O-methyl transferase () genotypes vs. one with clinical routine. The genotype-guided treatment reduced pain intensity (76 vs. 59 mm, < 0.01) by improving pain relief (28 vs. 48 mm, < 0.05), increased quality of life (43 vs. 56 mm < 0.001), and lowered the incidence of clinically relevant adverse events (3 [1-5] vs. 1 [0-2], < 0.01) and 42% opioid dose (35 [22-61] vs. 60 [40-80] mg/day, < 0.05) as opposed to usual prescribing arm. The final health utility score was significantly higher (0.71 [0.58-0.82] vs. 0.51 [0.13-0.67] controls, < 0.05) by improving sleepiness and depression comorbidity, with a significant reduction of 30-34% for headache, dry mouth, nervousness, and constipation. A large-scale implementation analysis could help clinical translation, together with a pharmaco-economic evaluation.