The opioid epidemic is one of the greatest public health problems that the USA faces. Opioid overdose death rates have increased steadily for more than a decade and doubled in 2013-17, as the highly potent synthetic opioid fentanyl entered the drug supply. Demographics of new HIV diagnoses among people who inject drugs are also changing, with more new HIV diagnoses occurring among White people, young people (aged 13-34 years), and people who reside outside large central metropolitan areas. Racial differences also exist in syringe sharing, which decreased among Black people and Hispanic people but remained unchanged among White people in 2005-15. Recent HIV outbreaks have occurred in rural areas of the USA, as well as among marginalised people in urban areas with robust HIV prevention and treatment services (eg, Seattle, WA). Multiple evidence-based interventions can effectively treat opioid use disorder and prevent HIV acquisition. However, considerable barriers exist precluding delivery of these solutions to many people who inject drugs. If the USA is serious about HIV prevention among this group, stigma must be eliminated, discriminatory policies must change, and comprehensive health care must be accessible to all. Finally, root causes of the opioid epidemic such as hopelessness need to be identified and addressed.