The association between added sugars or sugar-sweetened beverage consumption and the risk of depression, as well as the role of carbohydrate quality in depression risk, remains unclear. Among 15 546 Spanish university graduates from the Seguimiento Universidad de Navarra (SUN) prospective cohort study, diet was assessed with a validated 136-item semi-quantitative FFQ at baseline and at 10-year follow-up. Cumulative average consumption of added sugars, sweetened drinks and an overall carbohydrate quality index (CQI) were calculated. A better CQI was associated with higher whole-grain consumption and fibre intake and lower glycaemic index and consumption of solid (instead of liquid) carbohydrates. Clinical diagnoses of depression during follow-up were classified as incident cases. Multivariable time-dependent Cox regression models were used to estimate hazard ratios (HR) of depression according to consumption of added sugars, sweetened drinks and CQI. We observed 769 incident cases of depression. Participants in the highest quartile of added sugars consumption showed a significant increment in the risk of depression (HR=1·35; 95 % CI 1·09, 1·67, P=0·034), whereas those in the highest quartile of CQI (upper quartile of the CQI) showed a relative risk reduction of 30 % compared with those in the lowest quartile of the CQI (HR=0·70; 95 % CI 0·56, 0·88). No significant association between sugar-sweetened beverage consumption and depression risk was found. Higher added sugars and lower quality of carbohydrate consumption were associated with depression risk in the SUN Cohort. Further studies are necessary to confirm the reported results.