Opioids are commonly used in patients with breast cancer (BC), both for perioperative analgesia and for the relief of chronic cancer pain. Studies have suggested a potential association of opioid receptors (ORs) with the prognosis of BC patients. However, the exact roles of different ORs remain poorly understood. In this study, we found that κ opioid receptor (KOR) was the only OR (among the four types of ORs) that was significantly decreased in BC tumor tissues compared with peritumoral normal tissues. In addition, decreased expression of KOR correlated with poor clinical outcomes in patients with estrogen receptor (ER)-positive BC. In vitro studies confirmed the anti-tumor effects of KOR agonists in ER-positive MCF-7 and T47D cells by showing that activation of KOR significantly inhibited cellular proliferation and promoted apoptosis. Using Gene Ontology (GO), Kyoto Encyclopedia of Genes and Genomes (KEGG), and protein-protein interaction network (PPI) analysis, we found that KOR-ER-XBP1 was the potential downstream signaling pathway mediating the anti-tumor effects of KOR agonist. Finally, the role of XBP1 was confirmed as KOR activation-induced increase in the proliferative and monoclonal formation abilities of ER-positive BC cells were both significantly abolished after silencing of XBP1. These findings provide us a better understanding of the roles of different ORs in BC, identifying KOR agonists as better opioids than traditional μ opioid receptor (MOR) agonists for providing analgesia in ER-positive BC patients owing to their association with better prognosis.