Introducción: Los trastornos mentales constituyen una de las principales causas de discapacidad alrededor del mundo. Según la OMS, uno de cada nueve prisioneros experimenta algún trastorno de salud mental, respaldando la alta prevalencia de trastornos mentales en internos adolescentes y jóvenes, sin embargo, se desconoce la prevalencia en la población menor de edad que son diagnosticados dentro de la prisión. Materiales y métodos: Se llevó a cabo el análisis secundario de la base de datos del Censo Nacional de Población en los Centros Juveniles de Diagnóstico y Rehabilitación del año 2016 realizada por el Instituto Nacional de Estadística e Informática (INEI). La población estuvo conformada por todos los internos de los 10 centros juveniles de diagnóstico y rehabilitación a nivel nacional que no fueron diagnosticados de depresión antes de su ingreso al centro penitenciario. La variable dependiente fueron los casos nuevos de depresión diagnosticada por profesional de la salud y que fue autoreportada por los internos, y las variables independientes fueron la edad, el sexo, enfermedades de salud mental concomitantes, abandono del hogar por parte del interno, entre otras. Resultados: La edad promedio de los internos fue de 17 años (IQR 16;18) y hubo un predominio masculino (95,9%). Asimismo, el 1,4% de reclusos reporta el diagnóstico médico de depresión después de su ingreso al centro penitenciario. Se encontró que los internos que abandonaron su hogar antes de los 15 años, tenían 2,4 veces más prevalencia de nuevos diagnósticos de depresión (p=0,01; IC=1,2;4,7). Además, los internos con diagnóstico médico de ansiedad, tenían 7,2 veces más prevalencia de nuevo diagnóstico de depresión en comparación a los internos sin este diagnóstico (p<0,001, IC=3,3;15,7). Conclusiones: Se encontró asociación significativa entre el abandono del hogar antes de los 15 años y el diagnóstico médico de ansiedad con la prevalencia de nuevo diagnóstico de depresión.