There has been a lack of high-quality evidence concerning the association between childhood maltreatment and psychiatric diagnoses particularly for Axis II disorders. This study aimed to examine the association between childhood maltreatment exposure and Axis I and Axis II psychiatry disorders using electronic health records. In this study, the exposed group (n = 7473) comprised patients aged 0 to 19 years with a first-time record of maltreatment episode between January 1, 2001 and December 31, 2010, whereas the unexposed group (n = 26,834) comprised individuals of the same gender and age who were admitted into the same hospital in the same calendar year and month but had no records of maltreatment in the Hong Kong Clinical Data Analysis and Reporting System (CDARS). Data on their psychiatric diagnoses recorded from the date of admission to January 31, 2019 were extracted. A Cox proportional hazard regression model was fitted to estimate the hazard ratio (HR, plus 95% CIs) between childhood maltreatment exposure and psychiatric diagnoses, adjusting for age at index visit, sex, and government welfare recipient status. Results showed that childhood maltreatment exposure was significantly associated with subsequent diagnosis of conduct disorder/ oppositional defiant disorder (adjusted HR, 10.99 [95% CI 6.36, 19.01]), attention deficit hyperactivity disorder (ADHD) (7.28 [5.49, 9.65]), and personality disorders (5.36 [3.78, 7.59]). The risk of psychiatric disorders following childhood maltreatment did not vary by history of childhood sexual abuse, age at maltreatment exposure, and gender. Individuals with a history of childhood maltreatment are vulnerable to psychiatric disorders. Findings support the provision of integrated care within the primary health care setting to address the long-term medical and psychosocial needs of individuals with a history of childhood maltreatment. Copyright © 2022 The Author(s).