Cancer pain is an important factor affecting life quality of patients especially in the advanced stage and relieving pain is one of fundamental strategies for cancer treatment. Opioids such as morphine are the most widely used in clinics. However, they have been reported to be associated with the occurrence and development of several types of cancer. Thus, search for an opioid that has analgesic effect and can retard cancer progress simultaneously is critical for cancer management. In this study, we first examined the expression of μ and κ (MOR and KOR) in cell lines and tumor tissues of hepatocellular carcinoma (HCC), a malignant tumor with high mortality, and then compared the effects of opioid receptors-specific agonists on malignant phenotypes of HCC cells in vitro and tumor growth in an HCC xenograft mouse model. KOR and MOR were found to be highly expressed in HCC cell lines and HCC tissues. The KOR-specific agonist U50488h, oxycodone (agonist for both KOR and MOR) and the MOR-specific agonist morphine inhibited HCC cell proliferation, while only U50488h and oxycodone suppressed colony formation and migration of HCC cells. U50488h and oxycodone, but not morphine, induced HCC apoptosis. Further detection of PERK, GRP78 and CHOP revealed that PERK signaling was upregulated by treatment with U50488h, while treatment with the PERK inhibitor GSK2656157 partially reversed the promotion of apoptosis and inhibition of cell proliferation by U50488h, indicating that endoplasmic reticulum stress is associated with its suppressing effect on HCC malignant phenotypes. Similar to the in vitro results, HCC growth was significantly reduced by administration of U50488h and oxycodone, but not by morphine, in the HCC xenograft mouse model. PERK and caspase-3 in the HCC tissues were up-regulated by U50488h treatment as detected by immunohistochemistry and western blotting. Taken together, our results revealed that activation of KOR by U50488h inhibited malignant phenotypes of HCC both in vitro and in vivo, while activation of MOR by morphine did not have such effect. Because of their dual roles in the relief of pain and in the suppression of malignant phenotypes, opioids such as U50488h that act on KOR should be considered as the first choice for HCC management.