Background: After prison release, offenders with heroin use problems are at high risk of relapse and overdose death. There is a particular need for treatments that can be initiated in prison and continued after release into the community. Methadone maintenance treatment has been shown to reduce heroin use, criminality and mortality. Naltrexone implant treatment has not previously been evaluated in prison settings. Methods: This study compares the effects of naltrexone implants and methadone treatment on heroin and other illicit drug use, and criminality among heroin-dependent inmates after release from prison. Results: Forty-six volunteers were randomly allocated to naltrexone implants or methadone before release. Intention-to-treat analyses showed reductions in both groups in frequency of use of heroin and benzodiazepines, as well as criminality, 6 months after prison release. Conclusions: Naltrexone implants may be a valuable treatment option in prison settings.