Background: We tried to identify the interaction between dietary quality indices and apolipoprotein B Ins/Del and EcoR1 polymorphisms on cardio-metabolic risk factors in patients with type 2 diabetes mellitus (T2DM). Methods: This cross-sectional study recruited 700 adults with T2DM who visited diabetes referral centers in Tehran. The genotypes of Ins/Del and EcoR1 single nucleotide polymorphisms (SNP) were explored via polymerase chain reaction (PCR). Dietary quality index-international (DQI-I), healthy eating index-2015 (HEI-2015) and dietary phytochemical index (DPI) were calculated by semi-quantitative food frequency questionnaire (FFQ). Lipid, inflammatory, oxidative, hormonal and anthropometric variables were determined by standard methods. Results: We observed a significant interaction between DQI-I and Ins/Del SNP on leptin (P= 0.02 for crude model and P=0.01 for adjusted model (for age, physical activity, gender, smoking and alcohol intake) and 8-iso-prostaglandin F2 α (8-iso-PGF2α) (P=0.01 for both models), DPI and EcoR1 SNP on total cholesterol (TC) (P=0.03 for both models) and between Ins/Del SNP and HEI-2015 on interleukin-18 (IL-18) (P= 0.02 for crude model and P=0.03 for adjusted model). Furthermore, in crude but not in adjusted model there were close to meaningful interactions between EcoR1 SNP and DQI-I on total antioxidant capacity (TAC) (P=0.06) and between EcoR1 SNP and HEI-2015 on serum leptin (P=0.05) and superoxide dismutase (SOD) (p=0.05) levels. Conclusion: For the first time, our finding indicated that the association between DQI-I, HEI-2015 and DPI with IL-18, TC, leptin and 8-iso-PGF2α in patients with T2DM might be dependent on Ins/Del and EcoR1 variants in ApoB gene.