More knowledge about improving dietary intake in secondary preventive actions against childhood overweight and obesity is needed. The objective was to evaluate the impact of a 2-year intervention on energy, macronutrient and food intake of overweight and obese children participating in a randomised controlled trial. Children (8–12 years old) living in Sweden were recruited to participate for 2 years between 2006 and 2009. The children were randomised into either an intervention group (n 58), participating in an intervention concerning food habits, physical activity and behavioural change, or a control group (n 47). Dietary intake at baseline and the 2-year measurement were assessed with a diet history interview covering 14 d. Energy intake (EI) of the intervention and control groups was underestimated by 28 and 21 %, respectively, after 2 years, but with no difference between the groups (P = 0·51). After 2 years of intervention, the intervention group, compared with the control group, had a lower intake of sugar-sweetened beverages (P = 0·015) as well as a higher intake of foods high in fibre, low in saturated fat, sugar and salt (P = 0·031). Further, a lower EI in relation to BMR, lower total fat, MUFA and cholesterol was seen in the intervention group compared with the control group. In conclusion, the food and nutrient intake of overweight and obese children was improved after participating in a 2-year intervention programme. Dietary counselling should be included in secondary preventive actions against childhood overweight and obesity to promote healthy food habits.