People living with HIV (PWH) have higher risks for negative experiences and emotions such as discrimination, self-blame, and denial, which make them vulnerable to mental health problems. Those living with HIV and are in the developmental stage of young adulthood (18–39 years) have added psychological challenges arising from the pressure to perform the developmental tasks of this stage, which may gratify or thwart basic psychological needs (BPNs) and impact their mental health. The study examined whether positive psychological attributes, including a belief in a just world (BJW) and psychological capital, could be resources for satisfying basic psychological needs, hence boosting the mental health of Young Adults Living with HIV (YALWH). A comparison sample of university students was also included in the study. The results show that BJW was positively directly associated with BPN satisfaction, BPN frustration, and mental health (flourishing aspect) in the student sample but not in the YALWH sample. Psychological capital was appositively associated with BPN satisfaction and flourishing in the student sample. On the other hand, psychological capital is only positively associated with BPN satisfaction and negatively with BPN frustration and distress in the YALWH sample. The serial medial analysis revealed that the effects of BJW on mental health (flourishing) are mediated by psychological capital and BPN satisfaction in both samples. On the other hand, the effects of BJW on distress are mediated by psychological capital and BPN frustration, again in both samples. Incorporating interventions for strengthening positive psychological attributes could be helpful for YALWH and other young adults to attain desirable developmental outcomes for this stage and their mental health.