Achieving high coverage of HIV testing services is critical in many health systems, especially where HIV testing services remain centralized and inconvenient for many. As a result, planning the optimal spatial distribution of HIV testing sites is increasingly important. We aimed to assess the relationship between geographic distance and uptake of HIV testing services among the general population in Guangzhou, China. Utilizing spatial epidemiological methods and stratified household random sampling, we studied 666 adults aged 18-59. Computer-assisted interviews assessed self-reported HIV testing history. Spatial scan statistic assessed the clustering of participants who have ever been tested for HIV, and two-level logistic regression models assessed the association between uptake of HIV testing and the mean driving distance from the participant's residence to all HIV testing sites in the research sites. The percentage of participants who have ever been tested for HIV was 25.2% (168/666, 95%CI: 21.9%, 28.5%), and the majority (82.7%) of participants tested for HIV in Centres for Disease Control and Prevention, public hospitals or STIs clinics. None reported using self-testing. Spatial clustering analyses found a hotspot included 48 participants who have ever been tested for HIV and 25.8 expected cases (Rate Ratio = 1.86, P = 0.002). Adjusted two-level logistic regression found an inverse relationship between geographic distance (kilometers) and ever being tested for HIV (aOR = 0.90, 95%CI: 0.84, 0.96). Married or cohabiting participants (aOR = 2.14, 95%CI: 1.09, 4.20) and those with greater social support (aOR = 1.04, 95%CI: 1.01, 1.07) were more likely to be tested for HIV. Our findings underscore the importance of considering the geographical distribution of HIV testing sites to increase testing. In addition, expanding HIV testing coverage by introducing non-facility based HIV testing services and self-testing might be useful to achieve the goal that 90% of people living with HIV knowing their HIV status by the year 2020.