ImportanceOpioid-induced constipation (OIC) is prevalent among patients treated with opioids for cancer pain. Safe and effective therapies for OIC in patients with cancer remain an unmet need.ObjectiveTo determine the efficacy of electroacupuncture (EA) for OIC in patients with cancer.Design, Setting, and ParticipantsThis randomized clinical trial was conducted at 6 tertiary hospitals in China among 100 adult patients with cancer who were screened for OIC and enrolled between May 1, 2019, and December 11, 2021.InterventionsPatients were randomized to receive 24 sessions of EA or sham electroacupuncture (SA) over 8 weeks and then were followed up for 8 weeks after treatment.Main Outcomes and MeasuresThe primary outcome was the proportion of overall responders, defined as patients who had at least 3 spontaneous bowel movements (SBMs) per week and an increase of at least 1 SBM from baseline in the same week for at least 6 of the 8 weeks of the treatment period. All statistical analyses were based on the intention-to-treat principle.ResultsA total of 100 patients (mean [SD] age, 64.4 [10.5] years; 56 men [56.0%]) underwent randomization; 50 were randomly assigned to each group. Among them, 44 of 50 patients (88.0%) in the EA group and 42 of 50 patients (84.0%) in the SA group received at least 20 (≥83.3%) sessions of treatment. The proportion of overall responders at week 8 was 40.1% (95% CI, 26.1%-54.1%) in the EA group and 9.0% (95% CI, 0.5%-17.4%) in the SA group (difference between groups, 31.1 percentage points [95% CI, 14.8-47.6 percentage points]; P < .001). Compared with SA, EA provided greater relief for most OIC symptoms and improved quality of life among patients with OIC. Electroacupuncture had no effects on cancer pain and its opioid treatment dosage. Electroacupuncture-related adverse events were rare, and, if any, all were mild and transient.Conclusions and RelevanceThis randomized clinical trial found that 8-week EA treatment could increase weekly SBMs with a good safety profile and improve quality of life for the treatment of OIC. Electroacupuncture thus provided an alternative option for OIC in adult patients with cancer.Trial RegistrationClinicalTrials.gov Identifier: NCT03797586