In contrast to global AIDS data, which show a higher number of diagnosed HIV cases in women, the Indonesian National AIDS report reveals that the percentage of HIV cases in the country is significantly higher in men. Using a conceptual model of how social networks impact health, this paper describes how structural conditions, such as poverty, lack of job opportunities, and lack of income determined the engagement of Indonesian male labour migrants and motorbike taxi (also known as ojek) drivers in their respective professions and shaped their social networks. It also describes how these social networks created opportunities for various psychosocial mechanisms, including social influence, peer pressure, and intimate contact, that facilitated HIV infection through different behavioural pathways, such as unprotected sex with multiple partners and injecting drug use (IDU) practices. A qualitative design using face-to-face in-depth interviews was employed to collect data from participants in Yogyakarta municipality and Belu district, Indonesia. Participants were recruited using the snowball sampling technique, starting from two HIV clinics in the study settings. Data analysis was guided by a qualitative data analysis framework. The findings highlight the significance of structural conditions, such as poverty, poor family conditions, precarious employment, and lack of income, in determining the participants' engagement in labour migration and motorbike taxi driving. Involvement in these occupations allowed them to become acquainted with fellow labour migrants and ojek drivers, leading to cohabitation in the same shelters or areas and daily interactions, which fostered the development of social networks among them. These social networks then provided opportunities for various psychosocial mechanisms, including social influence through peer pressure and person-to-person contact. The influence and pressure experienced by the participants were reflected in their behaviours related to sex, condom use, and IDU, ultimately contributing to the transmission of HIV among them. The findings underscore the importance of public health interventions, such as HIV information and education, that take into account the dynamics of social networks in order to develop effective strategies for increasing understanding of HIV transmission and prevention, reducing vulnerability, and promoting safer behaviours among male labour migrants and ojek drivers.