Validated data regarding HIV-transmission in prisons in developing countries is scarce. We examined sexual and injecting drug use behavior and HIV and HCV transmission in an Indonesian narcotic prison during the implementation of an HIV prevention and treatment program during 2004-2007 when the Banceuy Narcotic Prison in Indonesia conducted an HIV transmission prevention program to provide 1) HIV education, 2) voluntary HIV testing and counseling, 3) condom supply, 4) prevention of rape and sexual violence, 5) antiretroviral treatment for HIV-positive prisoners and 6) methadone maintenance treatment. During a first survey that was conducted between 2007 and 2009, new prisoners entered Banceuy Narcotics Prison were voluntary tested for HIV and HCV-infection after written informed consent was obtained. Information regarding sexual and injecting risk behavior and physical status were also recorded at admission to the prison. Participants who tested negative for both HIV and HCV during the first survey were included in a second survey conducted during 2008-2011. During both surveys, data on mortality among HIV-seropositive patients were also recorded. All HIV-seropositive participants receive treatment for HIV. HIV/ AIDS-related deaths decreased: 43% in 2006, 18% in 2007, 9% in 2008 and 0% in 2009. No HIV and HCV seroconversion inside Banceuy Narcotic Prison were found after a median of 23 months imprisonment (maximum follow-up: 38 months). Total of 484.8 person-years observation was done. Participants reported HIV transmission risk-behavior in Banceuy Prison during the second survey was low. After implementation of HIV prevention and treatment program, no new HIV or HCV cases were detected and HIV-related mortality decreased.