The present study examined the association between high-quality diet (using the Mediterranean diet (MD) as an example) and well-being cross-sectionally and prospectively in Spanish children and adolescents. Participants included 533 children and 987 adolescents at baseline and 527 children and 798 adolescents at 2-year follow-up, included in the UP&DOWN study (follow-up in schoolchildren and adolescents with and without Down’s syndrome). The present study excluded participants with Down’s syndrome. Adherence to an MD was assessed using the KIDMED index. Well-being was measured using the Positive and Negative Affect Schedule and the KIDSCREEN-10 questionnaire. Associations between MD adherence and well-being were assessed using multi-level, mixed-effects linear regression. At baseline, MD adherence was positively related to health-related quality of life in secondary school girls and boys (β=0·41, se 0·10, P<0·001; β=0·46, se 0·10, P<0·001, respectively) and to positive affect in secondary school girls and boys (β=0·16, se 0·05, P=0·006; β=0·20, se 0·05, P<0·001, respectively) and in primary school boys (β=0·20, se 0·08, P=0·019). At 2-year follow-up, MD adherence was negatively related to negative affect in secondary school adolescent girls and boys (β=–0·15, se 0·07, P=0·047; β=–0·16, se 0·06, P=0·019, respectively), and MD adherence was associated with higher positive affect scores in secondary school girls (β=0·30, se 0·06, P<0·001) and in primary school boys (β=0·20, se 0·09, P=0·023). However, MD adherence at baseline did not predict well-being indicators at 2-year follow-up. In conclusion, higher MD adherence was found to behave as a protective factor for positive well-being in cross-sectional analysis.