PurposeSentencing practices in cases involving defendants with mental disorders are often opaque, as data on case facts and sentencing decisions are not easily accessible. MethodsThis paper reports findings from a national U.S. sample of appellate court cases across 46 states (n = 710) that involved mental health evidence. We collected detailed data on judge and defendant characteristics, type and severity of mental disorders, state sociopolitical ideologies, and legal factors such as offense and plea type and criminal history. We used a mixed quantitative approach, including machine learning, to examine how these intricate factors influence sentencing outcomes. ResultsA combination of linear regressions and supervised learning techniques reveals important differences in sentencing outcomes based on the type of mental disorder as well as the majority political ideology of states. We additionally show that, as compared to arguing no mental health evidence, having a mental disorder generally did not yield significant differences in sentencing. ConclusionsBoth a potential lack of scientific comprehension and the influence of sociopolitical ideology may help explain why certain mental disorders are aggravating in punishment contexts. We also discuss the advantages and limitations of supervised learning and classification trees for studying judicial decisions.