Life in prison can be seen as a situation that can cause ongoing problems and can cause psychiatric symptoms such as anxiety. Anxiety in WBP has cognitive and psychological threats, such as having no direction to live and feeling insignificant, especially for individuals who experience high anxiety and will experience disruption in the future. One way to explore their potential is that WBP must have high self-confidence to minimize feelings of anxiety. This study aims to determine the relationship between self-efficacy and anxiety in male WBP in class 2A prisons in Pekalongan City. The design of this study is a correlation description with a cross- sectional approach. The samples were taken using a total sampling technique based on inclusion criteria of 252 male WBP in Class 2A Prison in Pekalongan City. Data were collected using General Self-Efficacy Scale and Depression Anxiety Stress Scale 42 questionnaires. Data analysis using spearmen correlation test. The results showed the average age of respondents was 35.18 years. The most marital status was 140 respondents (55.6%) were married. The last education of most respondents was high school, with 75 respondents (29.8%). The average sentence handed down was 12–120 months, and the average experience of being built was 0.75 times. The analysis showed a relationship between self-efficacy and anxiety of fostered residents P value = 0.000 (p < 0.05), with a value of r2-0.267