This study explores the link between the OPRM1 gene's polymorphism and anxiety in cancer patients.<h4>Methods</h4>We prospectively recruited 76 patients experiencing pain from Yunfu People's Hospital and assessed them with questionnaires on anxiety, depression, quality of life, and other metrics before they commenced opioid treatment. This evidence concerns the gene OPRM1 and major depressive disorder.