In a survey of 424 intravenous drug users (IVDUs) of whom 107 were currently enrolled in a methadone maintenance program (MMP), we assessed risk behaviors for Human Immunodeficiency Virus (HIV) transmission and conducted HIV testing. We found that African Americans were over-represented in the HIV infected group and under-represented in the methadone maintenance treatment group. Furthermore, subjects in current methadone maintenance treatment reported fewer drug injections in the last 30 days, a reduced speedball (a heroin/cocaine mixture) injection frequency and reduced total cocaine and injected cocaine use. HIV infected subjects reported 20% more cocaine use and injected cocaine use than HIV negatives. However, this difference was due to African Americans reporting more cocaine use and at the same time being over-represented in the HIV infected group. Stratified analysis by ethnicity found significant MMP effects for all ethnic groups, but only one significant HIV status effect, and this was limited to African Americans. Cocaine injection frequency in African Americans was significantly higher for the HIV infected versus non-infected subjects. We conclude that i.v. cocaine use is a risk factor associated with HIV infection and that methadone maintenance treatment is associated with reducing this risk factor. Furthermore, African American cocaine users are at great risk for HIV infection, and increased efforts for engagement in treatment are necessary.