We examined the effect of drug treatment in 1996 on repeated (> or =2) emergency department visits and hospitalization in 1997 in a cohort of New York State Medicaid-enrolled human immunodeficiency virus (HIV)-positive and HIV-negative drug users. In HIV-positive drug users, the adjusted odds of repeated emergency department visits were increased for those receiving no long-term treatment (odds ratio [OR], 1.65; 95% confidence interval [CI], 1.04-2.75), whereas the adjusted odds for those receiving methadone treatment and those receiving drug-free treatment for > or =6 months did not differ. The adjusted odds of hospitalization in the HIV-positive group were higher for those receiving long-term methadone treatment (OR, 1.69; 95% CI, 1.14-2.55) and for those receiving no long-term treatment (OR, 1.91; 95% CI, 1.29-2.88), compared with those receiving drug-free treatment. In the HIV-negative group, these associations were similar but weaker. For both HIV-positive and HIV-negative drug users, long-term drug-free treatment was at least as effective as long-term methadone treatment in reducing use of services indicative of poorer access to care and/or poorer health.