Opioid-induced constipation is common and greatly affects the quality of life but is often under-recognised and undertreated. This study aimed to investigate the safety and effectiveness of naldemedine for opioid-induced constipation with cancer pain according to specific subgroups of clinical interest. In this exploratory post-hoc subgroup analysis of post-marketing surveillance from Japan (UMIN: 000042851), data were investigated by the subgroups: age (≥75, <75 years), Eastern Cooperative Oncology Group performance status (PS 0-2, 3-4), constipation severity (mild, moderate, severe), brain metastasis (yes, no), anticancer drug treatment (yes, no), opioid at naldemedine initiation (fentanyl only, only strong opioids other than fentanyl, weak opioids only, other), and prior or concomitant use of laxative (only osmotic/saline laxatives, only stimulant laxatives, other, none). Enrolled patients (n = 1184) received naldemedine (0.2 mg once daily) orally for up to 12 weeks. Regarding safety endpoints, the incidence of adverse drug reactions, including diarrhoea, was determined within each subgroup. Regarding effectiveness endpoints, improvement rates in the frequency and condition of bowel movements were investigated by subgroups. The incidence of adverse drug reactions, including diarrhoea, among subgroups ranged from 7.74% to 16.08% (diarrhoea: 5.95% to 13.19%), compared to 11.30% (diarrhoea: 9.09%) in the total population. Through week two to week 12, improvement rates in the frequency and condition of bowel movement among subgroups ranged from 63.6% to 89.7% and 67.6% to 94.9%, compared to 75.0% to 83.2% and 80.0% to 88.0% in the total population, respectively. Naldemedine was well tolerated and effective in patients with opioid-induced constipation and cancer pain regardless of the subgroups investigated.