Chronic pain is a common condition for which efficacious interventions tailored to highly affected populations are urgently needed. People with HIV have a high prevalence of chronic pain and share phenotypic similarities with other highly affected populations. To evaluate the efficacy of a behavioral pain self-management intervention called Skills to Manage Pain (STOMP) compared to enhanced usual care (EUC). This randomized clinical trial included adults with HIV who experienced at least moderate chronic pain for 3 months or more. The study was set at the University of Alabama at Birmingham and the University of North Carolina-Chapel Hill large medical centers from August 2019 to September 2022. STOMP combined 1-on-1 skill-building sessions delivered by staff interventionists with group sessions co-led by peer interventionists. The EUC control group received the STOMP manual without any 1-on-1 or group instructional sessions. The primary outcome was pain severity and the impact of pain on function, measured by the Brief Pain Inventory (BPI) summary score. The primary a priori hypothesis was that STOMP would be associated with a decreased BPI in people with HIV compared to EUC. Among 407 individuals screened, 278 were randomized to STOMP intervention (n = 139) or EUC control group (n = 139). Among the 278 people with HIV who were randomized, the mean (SD) age was 53.5 (10.0) years; 126 (45.0%) identified as female, 146 (53.0%) identified as male, 6 (2.0%) identified as transgender female. Of the 6 possible 1-on-1 sessions, participants attended a mean (SD) of 2.9 (2.5) sessions. Of the 6 possible group sessions, participants attended a mean (SD) of 2.4 (2.1) sessions. Immediately after the intervention compared to EUC, STOMP was associated with a statistically significant mean difference for the primary outcome, BPI total score: -1.25 points (95% CI, -1.71 to -0.78 points; P < .001). Three months after the intervention, the mean difference in BPI total score remained statistically significant, favoring the STOMP intervention -0.62 points (95% CI, -1.09 to -0.14 points; P = .01). The findings of this randomized clinical trial support the efficaciousness of STOMP as an intervention for chronic pain in people with HIV. Future research will include implementation studies and work to understand the optimal delivery of the intervention. ClinicalTrials.gov Identifier: NCT03692611.