HIV-positive patients who had the most recent CD4 count < 200 cells/mm3 were seven times [AOR = 6.99 (95%CI 2.81–17.38)] more likely to have depression than patients with CD4 count ≥ 500 cells/mm3. Here, CD4 is linked to major depressive disorder.