Introduction: Ecuador’s Comprehensive Organic Criminal Code (COIP) recognizes mental disorders as grounds for unfitness to plead. Despite the growing involvement of individuals with mental disorders in criminal activities, there is no specific catalog for the management of these conditions, which complicates the alignment between forensic and hospital diagnoses in hospitalized patients legally declared unfit to plead. Objective: To describe the proportion of agreement between forensic and hospital diagnoses in individuals processed with mental disorders and hospitalized at the Instituto de Neurociencias de Guayaquil between 2013 and 2022. Methodology: A descriptive, observational, cross-sectional, and retrospective study was conducted using clinical and legal records of 142 psychiatric cases processed by judicial mandate. The forensic, admission, and discharge diagnoses were analyzed along with the types of crimes and sociodemographic variables. Results: The findings indicated that most individuals declared unfit to plead were men between 18 and 34 years old, with crimes against life and personal integrity being the most frequent. Schizophrenia was the most common disorder cited as the cause of unfitness to plead. The proportion of agreement between forensic and hospital diagnoses was low, while the agreement between hospital admission and discharge diagnoses was good. Conclusion: These results suggest a low reliability of forensic diagnoses when declaring a person unfit to plead due to mental illness, while the good agreement between hospital admission and discharge diagnoses may reflect the effective use of assessment techniques, sufficient diagnostic periods, and careful observation of the patient.