Objective: HIV has a profound impact on infected individuals and their families. This study evaluated the efficacy of an intervention aimed at improving the mental health of people living with HIV (PLH) and their family members. Method: A randomized controlled trial of 475 PLH and 522 family members was conducted in Anhui, China. The intervention comprised activities at individual, family, and community levels. The study outcomes, which included depressive symptoms and coping with illness for the PLH and depressive symptoms and caregiver burden for the family members, were assessed at baseline and at 6-, 12-, 18-, and 24-month follow-up. We used a mixed-effects regression model with village- and participant-level random effects to assess the intervention effect on the improvement of outcome measures. Results: Relative to the control condition, the PLH and family members of the intervention group reported a significant reduction in depressive symptoms. The largest difference in depressive symptoms was observed at 6 months for the PLH and at 12 months for family members. Decreases in perceived caregiver burden over time were observed for family members in both conditions; however, the group difference did not reach statistical significance. Significant intervention effect on the coping with illness was reported by the PLH. Conclusions: The study highlights the importance of empowering families affected by HIV to confront the challenges together rather than individually. It may be optimal for future programs to include both PLH and their family members to maximize intervention effects through strengthening interactions and support within a family.