Chronic pain is common among persons living with HIV and changes in opioid prescribing practices may complicate HIV care management. Using medical record data from a retrospective cohort study conducted January 1, 2012 to June 30, 2019 for 300 publicly insured HIV-positive primary care patients prescribed opioids for chronic non-cancer pain in San Francisco, we examined associations between opioid dose changes and both time to disengagement from HIV care and experiencing virologic failure using logistic regression. Discontinuation of prescribed opioids was associated with increased odds of disengagement in care at 3, 6, and 9 months after discontinuation. There were no associations with virologic failure. Providers and policy makers must weigh impacts on HIV care when implementing necessary changes in opioid prescribing.