BackgroundDrug use poses multiple challenges to maintenance of the physical health of HIV-infected individuals. Few studies have explored the association between drug use and HIV treatment outcomes among HIV-infected men who have sex with men (MSM). We aimed to examine the relation between drug use (defined here as use of crystal methamphetamine, crack cocaine or cocaine, heroin, or off-label prescription medications) and HIV treatment outcomes (unsuppressed viral load and a low CD4 count) among HIV-infected MSM. MethodsAnalyses were done on all HIV-infected MSM who received Ryan White part A funded services at provider agencies in the greater New York metropolitan area, and had: an enrolment in a Ryan White part A programme between November, 2010, and June, 2012; at least one substance use assessment; and a valid viral load measurement with or without CD4 count in the 6 months before the substance use assessment. The primary outcomes for this study were unsuppressed viral load (>200 copies per mL) and a low CD4 count (<350 cells per μL). Independent associations between substance use and HIV treatment outcomes were examined by multivariate logistic regression. The multivariate model adjusted for all other covariates associated with poor HIV outcomes with p values less than 0·05 in unadjusted analyses. Results are presented as adjusted odds ratios (aORs) with 95% CIs. This project was classified as a programme evaluation (not research) by legal counsel at the New York City Department of Health and Mental Hygiene. FindingsAmong 3287 HIV-infected MSM, 366 (11%) reported drug use. Most of the study population was aged 30–49 years (1798 [55%]; range 13–82 years), non-Hispanic black (1424 [43%]), and on antiretroviral therapy (2530 [79%]). In bivariate analyses, drug users were more likely than non-users to have unsuppressed viral load (234 of 340 [some missing values; 69%] vs 1044 of 2717 [38%]) and a low CD4 count (154 of 336 [46%] vs 924 of 2691 [34%]). In multivariate analyses controlling for sociodemographic and clinical characteristics, drug users were more likely to have unsuppressed viral load (aOR 2·74, 95% CI 2·09–3·59) and a low CD4 count (1·41, 1·10–1·80) than were non-users. InterpretationOur results show a significant relation between drug use and both low CD4 count and unsuppressed viral load. Future studies should examine biological and psychosocial predictors of drug use, to inform intervention development for MSM who are drug users in HIV care settings. Although the substance use data for this study were based on self-report, which could be limited by recall and social desirability bias, this study was strengthened by use of the New York City HIV Surveillance Registry, which is a comprehensive source of longitudinal HIV-related laboratory data for individuals diagnosed with HIV or receiving HIV care in New York City. FundingThis work was supported through a grant from the Health Resources and Services Administration(H89HA00015) to the New York City Department of Health and Mental Hygiene.