ObjectiveThis study was designed to investigate pharmacological interaction between magnesium laxative and antacid in patients receiving opioid analgesic.MethodsData obtained from a total of 441 eligible patients receiving opioid analgesic for the first time were retrospectively analysed. The incidence of constipation, defined as stool‐free interval of 3 days and more within the first week of opioid intake, was compared between patients who took laxative alone and those who received laxative in combination with antacid.Key findingsLaxatives were prescribed in 74% of patients, among them 61% received antacids such as proton pump inhibitor and H2 receptor blocker. Magnesia was the most commonly used laxative (89%). Constipation occurred in 21% and 55% of patients with and without laxatives, respectively. Antacids reversed the laxative action of lower doses (<2000 mg/day) but not higher doses (>2000 mg/day) of magnesia without affecting the effects of other laxatives. Therefore, it is suggested that both acid‐dependent and acid‐independent mechanisms may operate in the laxative action of magnesia, in which the former may be involved in the action of lower doses of magnesia.ConclusionCare should be taken to avoid the unfavourable pharmacological interaction between low doses of magnesia and antacid.