Endocrine diseases, known as a curable etiology for depression, are common among men living with HIV (MLWH); while depression impedes the adherence to treatment and the perceived quality of life. We evaluated the changes in the depressive symptoms after the medical treatment of the underlying endocrine diseases among Iranian MLWH. Since April 2013 to March 2014, a convenience sample of 296 MLWH was recruited. We interviewed all the patients using the beck depression inventory (BDI-II) questionnaire.Participants with moderate to severe depression (n = 110, scores ≥ 21) were evaluated for endocrine diseases (evaluations: total testosterone, triiodothyronine, thyroxine, thyroid stimulating hormone, luteinizing hormone, follicle stimulating hormone, and serum cortisol). Eleven patients diagnosed with hypogonadism were, finally, considered for hormone replacement therapy. We re-evaluated the changes in the depressive symptoms with BDI-II. Out of 237 participants, 136 (75%) had BDI scores ≥ 21; 110 participated in the endocrine evaluations. Secondary hypogonadism was the only observed abnormality in 10% (n = 11) of the patients. Significant improvements were observed in BDI-II scores after 3 months of treatment (P = 0.027). The evaluation and the treatment of hypogonadism can help clinicians to properly address depression among people living with HIV; hence, improve the treatment compliance and the patient outcomes.