The migrant population, consisting of individuals who relocate from rural to urban areas, faces unique challenges that heighten their vulnerability to HIV infection. These challenges stem from a combination of sociodemographic factors and limited access to healthcare services. Understanding the dynamics of HIV transmission within this population is crucial for the development of effective prevention strategies. To investigate the factors contributing to HIV vulnerability among migrants, we conducted a cross-sectional study at Dongguan People's Hospital from January 1, 2018, to December 31, 2021. Our study focused on pregnant women living with HIV and their infants, with a particular emphasis on sociodemographic characteristics, HIV testing and treatment profiles, and neonatal clinical data. Data were systematically collected using standardized forms. Analysis of data from 98 participants revealed noteworthy findings. No significant associations were observed between age, marital status, and educational background regarding HIV vulnerability. Similarly, factors such as the status of sexual partners, spousal therapy, and the number of children had no significant impact. However, our analysis highlighted the critical role of treatment strategies for HIV-positive women and the timing of antiretroviral therapy initiation for women with HIV, both of which were associated with HIV transmission (P < 0.05). Additionally, factors such as feeding type, neonatal antiretroviral prophylaxis, and preventive treatment strategies showed significant associations, while the preventive treatment program for neonates demonstrated no significant impact. These findings provide valuable insights into the specific risk factors and barriers to HIV prevention faced by the migrant population in Dongguan. They underscore the importance of targeted interventions and policies aimed at curtailing mother-to-child HIV transmission. By addressing the unique challenges experienced by migrant mothers and their infants, this study contributes significantly to broader efforts in controlling the spread of HIV, ultimately enhancing the health outcomes and well-being of Dongguan's migrant population. Furthermore, our research introduces a distinctive perspective within the extensively examined domain of Prevention of Mother-to-Child Transmission (PMTCT) programs, focusing on the internally migrant Chinese population, an understudied demographic group in this context. This study, conducted in Dongguan, China, represents one of the pioneering investigations into pregnant women with HIV and their infants within this migrant community.