Background: Mental disorders like depression and anxiety are more prevalent in people living with HIV (PLHIV) than in the general population. Improved understanding of the relationship between mental disorders and HIV is important for designing interventions for this group. However, the relationship between mental disorders and HIV is complex and bidirectional. This paper explores the interrelationships between the psychological distress as measured by depression and anxiety symptoms, HIV status and other exogenous variables such as demographic, HIV and health-related variables using structural equation modelling. Methods: This secondary data analysis used the 2012 South African population-based household survey on HIV collected using a multi-stage stratified cluster sampling design. Generalized structural equation modelling (G-SEM) path analysis was used to explore the direct and indirect relationships of socio-demographic, health and HIV-related factors with psychological distress using HIV status as a moderator variable. Results: A total of 20 083 participants were included in the study, 21.7% reported psychological distress, of whom (12.6%) were HIV positive. In the final path model with HIV status as a moderator, psychological distress was significantly more likely among age group 25-49 years (AOR: 1.4 [95% CI: 1.3-1.6]), age 50 years and older, (AOR: 1.4 [95% CI: 1.2-1.6]), females (AOR:1.6 [95% CI: 1.4-1.8]), high risk drinkers (AOR: 1.9 [1.6-2.2]) hazardous drinkers (AOR: 4.4 [95% CI: 3.1-6.3]), ever tested for HIV (AOR: 1.2 [95% CI: 1.1-1.3]). Psychological distress was significantly less likely among the married [AOR: 0.8 (0.7-0.9)], other race groups [AOR: 0.5 (0.5-0.6)], those with secondary level education (AOR: 0.9 [95% CI: 0.8-0.9]), and tertiary level education (AOR: 0.7 [95% CI: 0.6-0.9]), those from rural informal [AOR: 0.8 (0.7-0.9)], and rural formal [AOR: 0.8 (0.7-0.9)] areas and those who rated their health as excellent/good [AOR: 0.4 (0.4-0.5)]. Conclusion: The findings highlight the mediating role of HIV positive status in producing psychological distress especially among young people, males and those with no education and / or low education attainment. Understanding this complex relationship is important for developing interventions to prevent psychological distress especially among PLHIV.