We examined the association of dietary carbohydrates, protein, fat (including fatty acid subtypes) and alcohol with the metabolic syndrome and its components, in a cross-sectional study of 1626 patients with at least one cardiovascular risk factor. Multivariate nutrient density substitution models were used to examine the associations between macronutrients (assessed by 24 h dietary recall) and the metabolic syndrome. These models express the effects of ‘substituting’ one macronutrient for another without altering total energy intake. Increases in carbohydrates offset by isoenergetic decreases in either fat or protein were associated with a decrease in the prevalence of the metabolic syndrome (OR 0·87 (95 % CI 0·81, 0·93), P < 0·0001; OR 0·70 (95 % CI 0·61, 0·79), P < 0·0001, per 5 % energy intake respectively). Increased intake of dietary fat at the expense of dietary protein was also associated with a decreased prevalence of the metabolic syndrome (OR 0·80 (95 % CI 0·70, 0·92), P = 0·002 per 5 % energy intake). There were no statistically significant differences between fatty acid subtypes (P>0·10). Consumption of up to one standard alcoholic drink per d was associated with a lower prevalence of the metabolic syndrome when compared with non-drinkers (OR 0·67 (95 % CI 0·50, 0·89), P = 0·006); however, these benefits were weakened with higher levels of alcohol intake (P = 0·10 for one to three drinks and P = 0·29 for >three drinks). Thus, a diet high in carbohydrates, low in fat and protein, with low-to-moderate alcohol intake, is associated with a reduced prevalence of the metabolic syndrome.