The HIV epidemic in Indonesia is a problem that must be addressed because it has an impact on the health status. Detecting the main predictors related to the incidence of Sexually Transmitted Infections (STIs) for the occurrence of HIV infection is very important, considering that STIs are the main entry point for HIV infection. This study aims to determine the relationship between STIs consisting of syphilis, gonorrhea, chlamydia, and HIV and to determine the relationship between the three STIs and HIV prevalence in at-risk sexual groups. This study used a cross-sectional design by analyzing data from the Integrated Biology and Behavior Survey for 2007, 2009, 2011, 2013, and 2015. The analysis used was logistic regression and fractional regression. Syphilis, gonorrhea, and chlamydia infections can increase the odds of a sexual group at risk for HIV infection, although not statistically significant. The OR value of syphilis infection in most models increases the chance of HIV infection. The prevalence of syphilis is related to the prevalence of HIV in each risk group, especially in the transgender and MSM. Every risky sexual group is expected to participate in every program for the prevention and control of STIs and HIV. In addition, it is necessary to strengthen programs that focus on eradicating STIs in at-risk sexual groups.