Depressive symptoms are common among people living with HIV (PLWH). The aim of this study was to identify the determinants of depressive symptoms in PLWH in Spain. A total of 1060 PLWH participated in this cross-sectional study and completed the Patient Health Questionnaire-9. The odds ratios for the presence of depressive symptoms were analyzed in a multivariable logistic regression model, including sociodemographic data, comorbidities, health-related behaviors, and social-environment-related variables. We found an overall prevalence of depressive symptoms of 21.42%; by subgroup, namely men, women, and transgender persons, prevalence was 18.13%, 32.81%, and 37.14%, respectively. Moreover, social isolation (OR = 1.05 [CI, 1.02–1.08]) and poor physical and mental quality of life (OR = 1.06 [CI, 1.02–1.09] and OR = 1.13 [CI, 1.09–1.17], respectively) were associated with depressive symptoms. As protective factors, we identified serodisclosure to more people (vs. none; OR = 0.39 [CI, 0.17–0.87]), satisfaction with social roles (OR = 0.86 [CI, 0.79–0.94]), better cognitive function (OR = 0.92 [CI, 0.89–0.95]), and sexualized drug use once in a lifetime (OR = 0.52 [CI, 0.29–0.93]). This study showed a high prevalence of depressive symptoms in PLWH, especially among women and transgender people. The association between psychosocial variables and depressive symptoms highlights the multidimensionality of the problem and identifies areas for intervention. This study found that the management of mental health issues is an area that needs to be improved and tailored to specific groups, with the aim of enhancing the well-being of PLWH.