The Joint United Nations Program on HIV/AIDS (UNAIDS) has set the "95-95-95" targets to ensure that 95% of all people living with HIV will know their HIV status, 95% of all people living with HIV will receive sustained antiretroviral therapy (ART), and 95% of all people receiving ART will achieve viral suppression (<1000 copies/mL). However, few countries have currently achieved these targets, posing challenges to the realization of the UNAIDS goal to eliminate the global HIV/AIDS epidemic by 2030. The Chinese government has implemented corresponding policies for HIV/AIDS prevention and control; however, it still faces the challenge of a large number of HIV/AIDS cases. Existing research predominantly focuses on the study of a particular region or population in China, and there is relatively limited research on the macro-level analysis of the spatiotemporal distribution of HIV/AIDS across China and its association with socioeconomic factors. This study seeks to identify the impact of these factors on the spatiotemporal distribution of HIV/AIDS incidence in China, aiming to provide scientific recommendations for future policy development. This study employed ArcGIS 10.2 (Esri) for spatial analysis, encompassing measures such as the imbalance index, geographical concentration index, spatial autocorrelation analysis (Moran I), and hot spot analysis (Getis-Ord Gi*). These methods were used to unveil the spatiotemporal distribution characteristics of HIV/AIDS incidence in 31 provinces of China from 2009 to 2019. Geographical Detector was used for ecological detection, risk area detection, factor detection, and interaction detection. The analysis focused on 9 selected socioeconomic indicators to further investigate the influence of socioeconomic factors on HIV/AIDS incidence in China. The spatiotemporal distribution analysis of HIV/AIDS incidence in China from 2009 to 2019 revealed distinct patterns. The spatial distribution type of HIV/AIDS incidence in China was random in 2009-2010. However, from 2011 to 2019, the distribution pattern evolved toward a clustered arrangement, with the degree of clustering increasing each year. Notably, from 2012 onwards, there was a significant and rapid growth in the aggregation of cold and hot spot clusters of HIV/AIDS incidence in China, stabilizing only by the year 2016. An analysis of the impact of socioeconomic factors on HIV/AIDS incidence in China highlighted the "urbanization rate" and "urban basic medical insurance fund expenditure" as the primary factors influencing the spatial distribution of HIV/AIDS incidence. Additionally, among social factors, indicators related to medical resources exerted a crucial influence on HIV/AIDS incidence. From 2009 to 2019, HIV/AIDS incidence in China was influenced by various socioeconomic factors. In the future, it is imperative to optimize the combination of different socioeconomic indicators based on regional incidence patterns. This optimization will facilitate the formulation of corresponding policies to address the challenges posed by the HIV/AIDS epidemic.