To determine the effects of borderline personality disorder (BPD) on 12-month treatment retention and outcomes for the treatment of heroin dependence. Longitudinal cohort study. Setting Sydney, Australia. A cohort of 495 heroin users enrolled in the Australian Treatment Outcome Study. Criteria for BPD were met by 45% of the cohort. At baseline there were no differences in heroin use, but the BPD group had higher levels of polydrug use, crime, needle risk-taking, more injection-related health problems, higher levels of overdose, poorer psychological health and more extensive suicide histories. At 12 months there was no group difference in the cumulative number of treatment days received, but the BPD group had enrolled in more different treatment episodes. Within both groups reductions had occurred in drug use and drug-related problems, with no differences in heroin use, polydrug use or global physical health at 12 months. After taking into account the effects of treatment on outcome, however, BPD was associated independently with a higher level of needle sharing [odds ratio (OR) 3.21], more injection-related health problems (OR 1.90), a higher likelihood of heroin overdose (OR 1.92), poorer global psychological health (OR 2.43), higher levels of current major depression (OR 3.19) and a higher likelihood of attempted suicide (OR 3.89). While BPD participants showed similar reductions in heroin and other drug use to other patients at 12 months, they continued to exhibit higher levels of risk and harm across a range of outcomes. Screening would appear to be warranted to identify a group who may overtly respond to treatment in terms of drug use per se, but remain at substantially greater risk.