This study aimed to evaluate the association between legume intake and blood pressure, as well as the mediating role of cardiometabolic risk factors in patients in secondary cardiovascular prevention. Socio-demographic, anthropometric, clinical and food intake data were collected from the baseline of the multicentre study Brazilian Cardioprotective Nutritional Program Trial – BALANCE (RCT: NCT01620398). The relationships between variables were explored through path analysis. In total, 2247 individuals with a median age of 63·0 (45–91) years, 58·8 % (n 1321) male and 96·5 % (n 2168) with diagnosis of hypertension were included. Negative associations were observed between histidine intake and systolic blood pressure (SBP) (standardised coefficient (SC) = −0·057; P = 0·012) and between legume intake and BMI (SC = −0·061; P = 0·006). BMI was positively associated with triglycerides–glucose (TyG) index (SC = 0·173; P < 0·001), SBP (SC = 0·144; P < 0·001) and diastolic blood pressure (DBP) (SC = 0·177; P < 0·001), and TyG index was positively associated with DBP (SC = 0·079; P = 0·001). A negative indirect effect was observed between the intake of legumes, SBP and DBP, mediated by BMI (SC = −0·009; P = 0·011; SC = −0·011; P = 0·010, respectively). In addition, an indirect negative effect was found between the intake of legumes and the DBP, mediated simultaneously by BMI and TyG index (SC = −0·001; P = 0·037). In conclusion, legume intake presented a negative indirect association with blood pressure, mediated by insulin resistance (TyG) and adiposity (BMI) in individuals of secondary care in cardiology.