Forensic psychiatric populations commonly contain a subset of persons with schizophrenia spectrum disorders (SSD) who have committed sex offenses. A comprehensive delineation of the features that distinguish persons with SSD who have committed sex offenses from persons with SSD who have committed violent non-sex offenses could be relevant to the development of differentiated risk assessment, risk management and treatment approaches. This analysis included the patient records of 296 men with SSD convicted of at least one sex and/or violent offense who were admitted to the Centre for Inpatient Forensic Therapy at the University Hospital of Psychiatry Zurich between 1982 and 2016. Using supervised machine learning, data on 461 variables retrospectively collected from the records were compared with respect to their relative importance in differentiating between men who had committed sex offenses and men who had committed violent non-sex offenses. The final machine learning model was able to differentiate between the two types of offenders with a balanced accuracy of 71.5% (95% CI = [60.7, 82.1]) and an AUC of .80 (95% CI = [.67, .93]). The main distinguishing features included sexual behaviours and interests, psychopathological symptoms and characteristics of the index offense. Results suggest that when assessing and treating persons with SSD who have committed sex offenses, it appears to be relevant to not only address the core symptoms of the disorder, but to also take into account general risk factors for sexual recidivism, such as atypical sexual interests and sexual preoccupation.