ImportanceChildhood housing insecurity has dramatically increased in the US in recent decades, but whether an association with adverse mental health outcomes exists after adjusting for repeated measures of childhood poverty is unclear.ObjectiveTo test whether childhood housing insecurity is associated with later anxiety and depression symptoms after adjusting for time-varying measures of childhood poverty.Design, Setting, and ParticipantsThis prospective cohort study included individuals aged 9, 11, and 13 years at baseline from the Great Smoky Mountains Study in western North Carolina. Participants were assessed up to 11 times from January 1993 to December 2015. Data were analyzed from October 2021 to October 2022.ExposureParticipants and their parents reported social factors annually when participants were 9 to 16 years of age. A comprehensive measure of childhood housing insecurity was constructed based on frequent residential moves, reduced standard of living, forced separation from home, and foster care status.Main Outcomes and MeasuresBetween ages 9 and 16 years, the Child and Adolescent Psychiatric Assessment was used up to 7 times to evaluate childhood anxiety and depression symptoms. Adult anxiety and depression symptoms were assessed at ages 19, 21, 26, and 30 years using the Young Adult Psychiatric Assessment.ResultsOf the 1339 participants (mean [SD] age, 11.3 [1.63] years), 739 (55.2%; 51.1% weighted) were male; 1203 individuals assessed up to 30 years of age were included in the adulthood outcome analyses. Standardized mean (SD) baseline anxiety and depression symptom scores were higher among children who experienced housing insecurity than among those who never experienced housing insecurity (anxiety: 0.49 [1.15] vs 0.22 [1.02]; depression: 0.20 [1.08] vs −0.06 [0.82]). Individuals who experienced childhood housing insecurity had higher anxiety symptom scores (fixed effects: standardized mean difference [SMD], 0.21; 95% CI, 0.12-0.30; random effects: SMD, 0.25; 95% CI, 0.15-0.35) and higher depression symptom scores (fixed effects: SMD, 0.18; 95% CI, 0.09-0.28; random effects: SMD, 0.26; 95% CI, 0.14-0.37) during childhood. In adulthood, childhood housing insecurity was associated with higher depression symptom scores (SMD, 0.11; 95% CI, 0.00-0.21).Conclusions and RelevanceIn this cohort study, housing insecurity was associated with anxiety and depression during childhood and with depression during adulthood. Because housing insecurity is a modifiable, policy-relevant factor associated with psychopathology, these results suggest that social policies that support secure housing may be an important prevention strategy.