In 2015, there were nearly 140 million orphaned children globally, particularly in low- and middle-income regions, and millions more for whom the street is central to their everyday lives. A total of 16.6 million children were orphaned because of deaths associated with HIV/AIDS, of whom 90% live in sub-Saharan Africa. Although most orphaned and separated children and adolescents in this region are cared for by extended family, the large number of children requiring care has produced a proliferation of institutional care. Few studies have investigated the association between care environment and physical health among orphaned and separated youths in sub-Saharan Africa. To examine the association of care environment with incident HIV and death among orphaned and separated children and adolescents who were living in charitable children's institutions, family-based settings, and street settings in western Kenya over almost 10 years. The Orphaned and Separated Children's Assessments Related to Their Health and Well-Being (OSCAR) project was an observational prospective cohort study conducted in Uasin Gishu County, Kenya. The cohort comprised 2551 orphaned, separated, and street-connected children from communities within 8 administrative locations, which included 300 randomly selected households (family-based settings) caring for children who were orphaned from all causes, 19 charitable children's institutions (institutional settings), and a convenience sample of 100 children who were practicing self-care on the streets (street settings). Participants were enrolled from May 31, 2010, to April 24, 2013, and were followed up until November 30, 2019. Care environment (family-based, institutional, or street setting). Survival regression models were used to investigate the association between care environment and incident HIV, death, and time to incident HIV or death. Among 2551 participants, 1230 youths were living in family-based settings, 1230 were living in institutional settings, and 91 were living in street settings. Overall, 1321 participants (51.8%) were male, with a mean (SD) age at baseline of 10.4 (4.8) years. Most participants who were living in institutional (1047 of 1230 youths [85.1%]) or street (71 of 91 youths [78.0%]) settings were double orphaned (ie, both parents had died). A total of 59 participants acquired HIV infection or died during the study period. After adjusting for sex, age, and baseline HIV status, living in a charitable children's institution was not associated with death (adjusted hazard ratio [AHR], 0.26; 95% CI, 0.07-1.02) or incident HIV (AHR, 1.49; 95% CI, 0.46-4.83). Compared with living in a family-based setting, living in a street setting was associated with death (AHR, 5.46; 95% CI, 2.30-12.94), incident HIV (AHR, 17.31; 95% CI, 5.85-51.25), and time to incident HIV or death (AHR, 7.82; 95% CI, 3.48-17.55). In this study, after adjusting for potential confounders, no association was found between care environment and HIV incidence or death among youths living in institutional vs family-based settings. However, living in a street setting vs a family-based setting was associated with both HIV incidence and death. This study's findings suggest that strengthening of child protection systems and greater investment in evidence-based family support systems that improve child and adolescent health and prevent youth migration to the street are needed for safe and beneficial deinstitutionalization to be implemented at scale.