Pain and heavy alcohol consumption are prevalent among people living with HIV/AIDS (PLWH), each contributing to impaired functioning and diminished quality of life. Each of these conditions may have negative effects on the HIV care continuum, but less is known about their combined influences. The current study examined how heavy drinking and pain were associated with HIV viral suppression and CD4 cell count among participants receiving antiretroviral therapy (ART). The study sample consisted of 220 PLWH with past 12-month substance dependence or ever injection drug use enrolled in a large HIV cohort study. Logistic regression analyses showed an interaction between pain level (no/mild pain vs moderate/severe) and heavy drinking on viral suppression such that heavy drinking was a significant predictor of poorer viral suppression only for those who experienced moderate/severe pain. We also examined whether ART adherence differentially mediated the association between heavy drinking and HIV viral suppression by level of pain. Although there was a significant indirect effect of heavy drinking on viral suppression among those with moderate/severe pain, moderated mediational analyses did not indicate that the indirect effect of heavy drinking on viral suppression through ART adherence differed significantly by level of pain. Pain level did not significantly moderate the association between heavy drinking and CD4 cell count. We conclude that heavy drinking may be particularly likely to be associated with poorer HIV viral suppression among PLWH with moderate or severe pain. Providers should routinely address comorbid heavy drinking and pain to improve HIV outcomes.