Prisoners are at increased risk of suicide. Investigation of both individual and environmental risk factors may assist in developing suicide prevention policies for prisoners and other high-risk populations. We conducted a matched case-control interview study with 60 male prisoners who had made near-lethal suicide attempts in prison (cases) and 60 male prisoners who had not (controls). We compared levels of depression, hopelessness, self-esteem, impulsivity, aggression, hostility, childhood abuse, life events (including events occurring in prison), social support, and social networks in univariate and multivariate models. A range of psychosocial factors was associated with near-lethal self-harm in prisoners. Compared with controls, cases reported higher levels of depression, hopelessness, impulsivity, and aggression, and lower levels of self-esteem and social support (all p values <0.001). Adverse life events and criminal history factors were also associated with near-lethal self-harm, especially having a prior prison spell and having been bullied in prison, both of which remained significant in multivariate analyses. The findings support a model of suicidal behaviour in prisoners that incorporates imported vulnerability factors, clinical factors, and prison experiences, and underscores their interaction. Strategies to reduce self-harm and suicide in prisoners should include attention to such factors.