BACKGROUND: With significant numbers of individuals in the criminal justice system having mental health problems, court-based diversion programmes and liaison services have been established to address this problem. AIMS: To examine the effectiveness of the New South Wales (Australia) court diversion programme in reducing re-offending among those diagnosed with psychosis by comparing the treatment order group with a comparison group who received a punitive sanction. METHOD: Those with psychoses were identified from New South Wales Ministry of Health records between 2001 and 2012 and linked to offending records. Cox regression models were used to identify factors associated with re-offending. RESULTS: A total of 7743 individuals were identified as diagnosed with a psychotic disorder prior to their court finalisation date for their first principal offence. Overall, 26% of the cohort received a treatment order and 74% received a punitive sanction. The re-offending rate in the treatment order group was 12% lower than the punitive sanction group. ‘Acts intended to cause injury’ was the most common type of the first principal offence for the treatment order group compared with the punitive sanction group (48% v. 27%). Drug-related offences were more likely to be punished with a punitive sanction than a treatment order (12% v. 2%). CONCLUSIONS: Among those with a serious mental illness (i.e. psychosis), receiving a treatment order by the court rather than a punitive sanction was associated with reduced risk for subsequent offending. We further examined actual mental health treatment received and found that receiving no treatment following the first offence was associated with an increased risk of re-offending and, so, highlighting the importance of treatment for those with serious mental illness in the criminal justice system.