Suicide is a prominent source of harm and death globally, and it is the leading cause of premature death among prisoners. Therefore, the main aim of this study was to determine the prevalence and factors associated with suicidal ideation and attempt among prisoners in Northwest Ethiopia. An institution-based cross-sectional study design was performed from May 23 to June 22, 2022. After proportional allocation to the three correctional institutions, a total of 788 study participants were randomly recruited. The World Health Organization Composite International Diagnostic Interview (CIDI) was used to evaluate suicide ideation and attempt. To determine factors associated with suicidal ideation and attempt, multivariate logistic regression analyses were conducted. At a 95% confidence interval (CI) of P-value <0.05, statistical significance was declared. The prevalence of suicidal ideation and attempt among prisoners was 23.6% and 10.7%, with 95% CI (20.76, 26.70) and (8.68, 13.02), respectively. Female sex (AOR = 2.38, 95% CI: 1.12, 5.05), family history of mental illness (AOR = 3.09, 95% CI: 1.93, 4.88), depression (AOR = 2.04, 95% CI: 1.43, 2.98), poor social support (AOR = 2.76, 95% CI: 1.56, 4.85) and previous incarceration (AOR = 1.84, 95% CI: 1.18, 2.86) were significantly associated with suicidal ideation. However, being single (AOR = 2.58, 95% CI: 1.47, 4.54), family history of suicide (AOR = 2.43, 95% CI: 1.18, 5.01), depression (AOR = 2.62, 95% CI: 1.59, 4.31) and previous imprisonments (AOR = 2.11, 95% CI: 1.20, 3.69) were associated with suicidal attempt. The prevalence of suicidal ideation and attempt among prisoners were found to be high. Therefore, the findings of this study recommend that early detection and design of prison mental health services should be delivered to develop mental health care, prevention, and intervention programs for incarcerated people to improve suicidal behavior in prison.