Obesity, a highly prevalent disorder and central diagnosis of the metabolic syndrome, is linked to mental health by clinical observations and biological pathways. Patients with a diagnosis of obesity may show long-lasting increases in risk for receiving psychiatric co-diagnoses. Austrian national registry data of inpatient services from 1997 to 2014 were analyzed to detect associations between a hospital diagnosis of obesity (ICD-10: E66) and disorders grouped by level-3 ICD-10 codes. Data were stratified by age decades and associations between each pair of diagnoses were computed with the Cochran-Mantel-Haenszel method, providing odds ratios (OR) andpvalues corrected for multiple testing. Further, directions of the associations were assessed by calculating time-order-ratios. Receiving a diagnosis of obesity significantly increased the odds for a large spectrum of psychiatric disorders across all age groups, including depression, psychosis-spectrum, anxiety, eating and personality disorders (allpcorr< 0.01, all OR > 1.5). For all co-diagnoses except for psychosis-spectrum, obesity was significantly more often the diagnosis received first. Further, significant sex differences were found for most disorders, with women showing increased risk for all disorders except schizophrenia and nicotine addiction. In addition to the well-recognized role in promoting disorders related to the metabolic syndrome and severe cardiometabolic sequalae, obesity commonly precedes severe mental health disorders. Risk is most pronounced in young age groups and particularly increased in female patients. Consequently, thorough screening for mental health problems in patients with obesity is urgently called for to allow prevention and facilitate adequate treatment.