To evaluate the additive effect of naldemedine tosylate (naldemedine) on opioid-induced constipation in cancer patients insufficiently responding to magnesium oxide treatment. We combined two randomized, double-blind, placebo-controlled, phase IIb and III trials of naldemedine and conducted a post hoc subgroup analysis. We evaluated the effect and safety of naldemedine in 116 patients who received naldemedine in addition to magnesium oxide (naldemedine group) and 117 patients who received placebo in addition to magnesium oxide (placebo group). Both groups included patients insufficiently responding to magnesium oxide for opioid-induced constipation. Effect was assessed using spontaneous bowel movement responder rate, complete spontaneous bowel movement responder rate, changes in spontaneous bowel movements and complete spontaneous bowel movements. Safety was also assessed. During the 2-week treatment period, the responder rates for spontaneous bowel movement and complete spontaneous bowel movement were 73.3 and 43.1% in naldemedine group, respectively, which were significantly higher (P<0.0001) than 41.9 and 14.5% in placebo group, respectively. Median time to first spontaneous bowel movement and first complete spontaneous bowel movement was significantly shorter (P<0.0001) in the naldemedine group (4.0 and 21.3h, respectively) than in the placebo group (27.7 and 211.7h, respectively). The incidence of adverse events and diarrhoea was significantly higher (P<0.05) in the naldemedine group than in the placebo group, while the incidence of serious adverse events and severe diarrhoea was not significantly different between the naldemedine and placebo groups. The study suggested the addition of naldemedine as an effective treatment option for opioid-induced constipation in cancer patients insufficiently responding to magnesium oxide treatment.