To examine the long-term impact of methadone maintenance treatment (MMT) on mortality, re-incarceration and hepatitis C seroconversion in imprisoned male heroin users. The study cohort comprised 382 imprisoned male heroin users who had participated in a randomized controlled trial of prison-based MMT in 1997/98. Subjects were followed-up between 1998 and 2002 either in the general community or in prison. All-cause mortality, re-incarceration, hepatitis C and HIV serostatus and MMT retention. There were no deaths recorded while subjects were enrolled in MMT. Seventeen subjects died while out of MMT, representing an untreated mortality rate of 2.0 per 100 person-years (95% CI, 1.2-3.2). Re-incarceration risk was lowest during MMT episodes of 8 months or longer (adjusted hazard ratio 0.3 (95% CI, 0.2-0.5; P < 0.001), although MMT periods 2 months or less were associated with greatest risk of re-incarceration (P < 0.001). Increased risk of hepatitis C seroconversion was significantly associated with prison sentences of less than 2 months [adjusted hazard ratio 20 (95% CI, 5-76; < P = 0.001)] and MMT episodes less than 5 months [adjusted hazard ratio 4.2 (95% CI, 1.4-12.6; P = 0.01)]. Subjects were at greatest risk of MMT dropout during short prison sentences of 1 month or less (adjusted hazard ratio 10.4 (95% CI, 7.0-15.7; P < 0.001). HIV incidence was 0.3 per 100 person-years (95% CI, 0.03-0.99). Retention in MMT was associated with reduced mortality, re-incarceration rates and hepatitis C infection. Prison-based MMT programmes are integral to the continuity of treatment needed to ensure optimal outcomes for individual and public health.