BackgroundDepression has a multitude of clinical and public health consequences for HIV patients. The magnitude of HIV patients who failed first-line antiretroviral treatment and switched to second-line therapy is becoming a growing public health concern. However, unlike first-line therapy, to date, little attention has been given to mental health problems in such patients, particularly in the era of the COVID-19 pandemic. Thus, this research was conducted to determine the magnitude of depression and its determinants among HIV patients on second-line antiretroviral therapy.MethodsA multi-centered cross-sectional study was conducted on 714 HIV patients on second-line therapy who were selected via systematic random sampling. Data were collected in personal interviews as well as document reviews. The nine-item patient health questionnaire score was used to assess depression, while the three-item Oslo Scale was used to assess social support. The associations between exogenous, mediating, and endogenous variables were identified simultaneously using structural equation modeling. Statistical significance was declared at a P-value less than 0.05, and the effect sizes were presented using 95% CI.ResultsDepression was reported in 27.7% of HIV patients on second-line therapy [95% CI: 24.7–31.1%]. Social support has a direct [widehat{beta } = − 0.9, (95% CI: − 1.11 to − 0.69)] and indirect [widehat{beta } = − 0.22, (95% CI: − 0.31 to − 0.13)] negative effect on depression. Perceived stigma was a mediator variable and significantly associated with depression [widehat{beta } = 0.40, (95% CI: 0.23–0.57)]. Co-morbid illness [widehat{beta } = 0.49, (95% CI: 0.35–0.63)], high viremia [widehat{beta } = 0.17, (95% CI: 0.08–0.26], moderate and high-risk substance use [widehat{beta } = 0.29, (95% CI: 0.18–0.39)], and not-workable functional status [widehat{beta } = 0.2, (95% CI: 0.1–0.31)] were all positively associated with depression.ConclusionsThis study revealed that there was a high prevalence of depression among HIV patients on second-line antiretroviral therapy. Social and clinical factors were associated with depression risk. As a result, screening, prevention, and control strategies, including psychosocial support, should be strengthened in routine clinical care.