The prevalence of hepatitis C virus (HCV) and the acquired immunodeficiency virus (HIV) is much higher in prisons than in community settings. Some explanatory factors for this burden include putative aspects of the prison environment, such as unprotected sexual relations and sexual violence, use of injectable drugs and syringe sharing. Nonetheless, efforts in better understanding the dynamics of both HCV and HIV are scarce in developing countries such as Brazil, which poses a risk not only to the inmates but to the community as well. In this investigation, we sought to determine the seroprevalence and sociodemographic and behavioral risk factors associated with HIV and anti-HCV antibodies among men detained at high-security institutions. This is an epidemiological, proportionally stratified observational study including 1,132 inmates aged 18 to 79 years-old (Mage = 32.58±10.18) from eleven high-security prisons located in the State of Paraná, Brazil. We found that HIV and anti-HCV prevalence were 1.6% (95% CI: 1.0–2.5) and 2.7% (95% CI: 1.0–2.5), respectively. Risk factors associated with HIV included not receiving intimate visits (OR = 8.80, 95% CI: 1.15–66.88), already having another sexually transmitted infection (OR = 3.89, 95% CI: 1.47–10.29), and reporting attendance in HIV preventive campaigns (OR = 4.24, 95% CI: 1.58–11.36). Moreover, anti-HCV seroprevalence was associated with higher age (OR = 4.03, 95% CI: 1.61–10.07), criminal recidivism (OR = 2.58, 95% CI 1.02–6.52), and the use of injectable drugs (OR = 7.32, 95% CI 3.36–15.92). Although prisons might increase the risk for acquiring and transmitting HIV and HCV, the adoption of permanent epidemiological surveillance programs could help reducing the circulation of viruses, involving strategies focusing on screening, treating, and preventing infections to assure proper prisoner health. Moreover, these policies need to take place inside and outside the prison environment to offer continued assistance to former prisoners once they leave the institution.