There is a high incidence of self-harming behavior in the prison setting, with a suicide rate that is higher than that of the general population. Previous studies describe the association of sociodemographic, clinical, and criminological factors with the risk of suicide in the male prison population, but there is little research that specifically analyses suicidal behavior among women. The objective of this study is to analyze the characteristics of inmates who are admitted to a psychiatric unit for suicidal thoughts or attempted suicide. Descriptive and comparative analysis of 97 inmates (68 men, 29 women) admitted to the Unidad de Hospitalización Psiquiátrica Penitenciaria de Cataluña (UHPP-C), for suicidal ideation, between January 1, 2017, and December 31, 2022. There are differences in terms of place of birth, with a more significant presence of African nationalities in non-national males, while foreign inmates tend to come from Latin American countries. Men have a lower mean age, longer admissions, and a higher readmission rate. They also suffer from more psychotic and addictive disorders. Women have a higher prevalence of personality disorders and affective symptoms. There are sociodemographic and clinical differences between male and female prison inmates who require admission for suicidal ideation. Including a gender perspective in studies on suicide risk in the prison population can provide a solid foundation for future studies, thus allowing a more complete understanding of suicidal ideation and intervention needs in the prison population.