The effect of gender, age, and urban versus rural residence on suicide risk among people with different mental disorders is unknown. To estimate cohort-specific risk of suicide among people with different types of mental disorders using data from China's National Psychological Autopsy Study. Logistic regression models estimated adjusted odd ratios (OR) in 895 suicides and 701 injury deaths. The adjusted risk of suicide for mood disorders was highest (OR = 44.2) followed by that for other mental disorders (OR = 10.7), anxiety disorders (OR = 10.2), psychotic disorders (OR = 7.4), substance use disorders (2.7) and organic mental disorders (OR = 1.2). Risk of suicide among urban residents with any mental disorder was more than double that of rural residents (OR = 15.5 v. 7.6, P = 0.008). The suicide risk associated with mental illness varies by type of illness and by demographic cohort. Lower risk of suicide among rural residents with mental disorders highlights the importance of non-mental health approaches to the prevention and management of suicidal behaviour in rural areas of low- and middle-income countries.