Retention in healthcare and health behavior remains a critical issue, contributing to inequitable distribution of intervention benefits. In diseases such as HIV, where half of the new infections occur among racial and sexual minorities, it is important that interventions do not enlarge pre-existing health disparities. To effectively combat this public health issue, it is crucial that we quantify the magnitude of racial/ethnic disparity in retention. Further, there is a need to identify mediating factors to this relationship to inform equitable intervention design. In the present study, we assess the racial/ethnic disparity in retention in a peer-led online behavioral intervention to increase HIV self-testing behavior and identify explanatory factors. The research used data collected from the Harnessing Online Peer Education (HOPE) HIV Study that included 899 primarily African American and Latinx men who have sex with men (MSM) in the United States. Results show that African American participants had higher lost-to-follow-up rates at 12-week follow-up compared to Latinx participants (11.1% and 5.8% respectively, Odds Ratio = 2.18, 95% confidence interval: 1.12 - 4.11, p = 0.02), which is substantially mediated by participants' self-rated health score (14.1% of the variation in the African American v.s. Latinx difference in lost-follow-up, p = 0.006). Thus, how MSM perceive their health may play an important role in their retention in HIV-related behavioral intervention programs and its racial/ethnic disparity.