Background Given the high prevalence of mental health problems among prisoners, knowledge on its determinants is important. Prior cross-sectional studies suggest that procedurally just treatment within prison is a significant predictor; however, longitudinal research is lacking. Aim The aims of this study were to examine (1) the longitudinal relationship between prisoners' perceptions of procedural justice - including fairness, respect, humanity and relationships with officers - and their mental health and (2) the moderating role of coping style in this relationship. Methods Data were obtained from the Prison Project, a longitudinal study of adult male prisoners in the Netherlands, interviewed both 3 weeks and 3 months after their reception into pre-trial detention (N = 824). A cross-lagged structural equation model was employed to investigate associations. Results Prisoners who reported experiencing a higher level of procedural justice 3 weeks after their arrival in custody reported fewer mental health problems after 3 months. No evidence was found that coping style moderated this relationship. Conclusions These findings suggest a causal relationship between procedural justice and psychological well-being. Fair and respectful treatment of prisoners is a predictor not only of prison order and prisoners' compliance but also of prisoners' psychological well-being. Copyright © 2013 John Wiley & Sons, Ltd.