This paper presents a study on self-legitimacy of police and prison officers conducted in 2013 and 2014 on a sample of 529 police officers and 101 prison officers in Slovenia. We studied demographic variables, procedural justice of supervisors, relations with colleagues, and the public's beliefs on police legitimacy, all of which bear impact on self-legitimacy of both professional groups. We found out that self-legitimacy is positively correlated to relations with colleagues, procedural justice of their supervisors, and the public's perception (citizens and prisoners). Further, self-legitimacy is stronger in older respondents with more years of service and a higher level of education. The second part of the analysis focuses on the impact of self-legitimacy and other variables on pro-organizational behavior of police and prison officers, showing that self-legitimacy affects pro-organizational behavior of both professional groups. In the police, pro-organizational behavior depends on relations with colleagues and procedural justice of supervisors, while in prison officers, the beliefs on self-legitimacy by prisoners affect pro-organizational behavior. Police officers' beliefs on whether or not the public perceives them as legitimate does not affect their pro-organizational behavior, while in prison officers this dimension negatively correlates with procedural justice of supervisors.