Our objective was to determine the prevalence and incidence of human immunodeficiency virus (HIV) infection and related risk behaviors among opiate-abusing intravenous drug users (IVDUs) either in or out of methadone treatment. The subjects, 152 in-treatment and 103 out-of-treatment intravenous opiate users, were followed prospectively for 18 months. Behavioral and serologic assessments were made at 6-month intervals, with complete information available on 89% of the sample. Subjects were recruited from a single methadone maintenance program and the surrounding neighborhood in north-central Philadelphia. At baseline, the HIV seroprevalence rate for the total sample was 12%: 10% for the methadone-maintained group and 16% for the out-of-treatment group. Out-of-treatment subjects were injecting drugs, sharing needles, visiting shooting galleries, and practicing unsafe sex at significantly higher rates than in-treatment subjects. Follow-up of HIV-negative subjects over the next 18 months showed conversion rates of 3.5% for those who remained in methadone maintenance versus 22% for those who remained out of treatment. The sixfold difference in rate of seroconversion between the two groups suggests that although rapid transmission of HIV still occurs, opiate-abusing IVDUs who enter methadone treatment are significantly less likely to become infected. In contrast, those opiate addicts who do not enter treatment are at significantly higher risk of contracting and spreading the disease. Implications for developing additional risk interventions for out-of-treatment IVDUs are discussed.