Background: People who inject drugs (PWID) experience high HIV incidence, limited access to antiretroviral therapy (ART) and medication-assisted treatment (MAT), and high mortality. We report the effect of an integrated, flexible intervention on HIV and substance use outcomes. Methods: HIV Prevention Trials Network 074 was a randomized, controlled vanguard study conducted in Ukraine, Indonesia, and Vietnam and designed to assess the feasibility of a future trial. HIV-infected PWID index participants (indexes) were enrolled with ≥1 HIV-uninfected injection partner. Indexes were randomly assigned (ratio=3:1) to standard of care (SOC) or an intervention comprising systems navigation, psychosocial counseling, and ART at any CD4 count. Local ART and MAT services were used. Outcomes included retention, ART use, viral suppression, MAT use, mortality, and injection partner HIV incidence. Findings: 502 indexes and 806 partners were enrolled. At 52 weeks, most living indexes (86%) and partners (80%) were retained. At week 52, self-reported ART use was higher among intervention indexes (72%) than SOC indexes (43%) (probability ratio (PR) 1.7, 95% confidence interval (CI): 1.4, 1.9). Viral suppression also increased (intervention: 41%, SOC: 24%; PR: 1.7, 95% CI: 1.3, 2.2). Intervention indexes reported more MAT use at 52 weeks (41%; SOC 25%; PR: 1.7, 95% CI: 1.3, 2.2). Mortality was reduced with the intervention (indexes: hazard ratio (HR): 0.47, 95% CI: 0.22, 0.90; partners: HR: 0.17, 95% CI: 0.01, 0.84). All incident HIV infections occurred in SOC partners (intervention (0 cases): 0.0/100 person-years; 95% CI: 0, 1.7; SOC (7 cases): 1.0/100 person-years, 95% CI: 0.4, 2.1; incidence rate difference: −1.0/100 person-years (95% CI: −2.1, 1.1)). Interpretation: This randomized, controlled vanguard trial provides strong evidence that a flexible, scalable intervention increases ART and MAT use and reduces mortality among PWID. The intervention may also reduce HIV transmission to injection partners.