Despite a burgeoning literature on adherence to HIV therapies, few studies have examined the impact of ongoing drug use on adherence and viral suppression, and none of these have utilized electronic monitors to quantify adherence among drug users. We used 262 electronic monitors to measure adherence with all antiretrovirals in 85 HIV-infected current and former drug users, and found that active cocaine use, female gender, not receiving Social Security benefits, not being married, screening positive for depression, and the tendency to use alcohol or drugs to cope with stress were all significantly associated with poor adherence. The strongest predictor of poor adherence and, in turn, failure to maintain viral suppression, was active cocaine use. Overall adherence among active cocaine users was 27%, compared to 68% among subjects who reported no cocaine use during the 6-month study period. Consequently, 13% of active cocaine users maintained viral suppression, compared to 46% of nonusers. Interventions to improve adherence should focus on reducing cocaine use, developing adaptive coping skills, and identifying and treating depression.