OBJECTIVES: To examine changes the in use of prescription opioids for the management of chronic noncancer pain in human immunodeficiency virus (HIV)-infected patients and to identify patient characteristics associated with long-term use. METHODS: Long-term prescription opioid use (ie, 120+ days supply or 10+ prescriptions during a year) was assessed between 1997 and 2005 among 6939 HIV-infected Kaiser Permanente members and HIV-uninfected persons in the general health plan memberships. RESULTS: In 2005, 8% of HIV individuals had prevalent long-term opioid use, more than double the prevalence among HIV-uninfected individuals. However, the large increases in use from 1997 to 2005 in the general population were not observed for HIV-infected individuals. The strongest associations with prevalent use among HIV-infected individuals were female sex with a prevalence ratio (PR) of 1.8 (95% CI=1.3, 2.5); Charlson comorbidity score of 2 or more (compared with a score of 0) with a PR of 1.9 (95% CI=1.4, 2.8); injection drug use history with a PR of 1.8 (95% CI=1.3, 2.6); and substance use disorders with a PR of 1.8 (95% CI=1.3, 2.5). CD4, HIV viral load, and acquired immunodeficiency syndrome diagnoses were associated with prevalent opioid use early in the antiretroviral therapy era (1997), but not in 2005. CONCLUSIONS: Long-term opioid use for chronic pain has remained stable over time for HIV patients, whereas its use increased in the general population. The prevalence of prescribed opioids in HIV patients was highest for certain subgroups, including women, and those with a comorbidity and substance abuse history.