BACKGROUNDUltraprocessed foods (UPF) consumption has been associated with depression risk, but its association with depression persistence is unclear.OBJECTIVEThe objective of this study was to evaluate the association of UPF consumption with depression persistence and incidence.DESIGNThe Brazilian Longitudinal Study of Adult Health is a multicenter prospective cohort study with 3 waves (2008-2010, 2012-2014, and 2017-2019). Baseline percentage of energy from UPF, measured using a food frequency questionnaire, was divided into quartiles.PARTICIPANTS/SETTINGCivil servants aged 35 to 74 years at baseline were included in the Brazilian Longitudinal Study of Adult Health. Participants with Parkinson disease, dementia, stroke history, extreme energy intake, and missing dietary or depression data at baseline were excluded.MAIN OUTCOME MEASURESDepression was based on the Clinical Interview Schedule-Revised, depression persistence on depression status at each wave and depression incidence on time to first depression diagnosis.STATISTICAL ANALYSES PERFORMEDClustering large applications algorithm, multinomial logistic regression, Cox proportional-hazard models, and partition substitution model were performed.RESULTSAmong 13 870 participants free from depression at baseline, 731 (5.3%) had depression after 8 years of follow-up. Participants in Cluster 1 did not have depression in any wave, in Cluster 2 had depression in 1 wave, and in Cluster 3 had persistent depression in 2 or more waves. Compared with the first quartile of UPF consumption, participants in Quartiles 2, 3, and 4 had a 1.30 (95% CI 1.29 to 1.31), 1.39 (95% CI 1.38 to 1.40), and 1.58 (95% CI 1.56 to 1.60) higher odds of persistent depression (P = .019), respectively. Compared with the first UPF quartile, participants in Quartiles 3 and 4 had a 1.32 (95% CI 1.07 to 1.64) and 1.30 (95% CI 1.04 to 1.61) higher risk of incident depression (P = .017), respectively. Substituting 5%, 10%, and 20% of UPF with unprocessed/minimally processed foods and culinary ingredients was associated with a 6%, 11%, and 22% decreased depression incidence, respectively.CONCLUSIONSHigher consumption of UPF at baseline was associated with higher odds of persistent depression and higher risk of incident depression over 8 years of follow-up.