Background: Cardiovascular diseases (CVDs) have been associated with an unhealthy lifestyle, including poor diet. Indices reflecting the overall quality of diets are more effective than single food or nutrient-based approaches are in clarifying the diet disease relationship. The present study aims to use latent variable modeling to examine the longitudinal joint relationships between the latent profiles of CVDs risk factors and the diet quality index (DQI).Methods: A total of 4390 Iranian adults aged 35 and older within the framework of the Isfahan Cohort Study (ICS) were included in the current secondary analysis. DQI was assessed using a validated food frequency questionnaire. Blood pressure (BP), anthropometric measurements, blood glucose, serum lipids, and high-sensitivity C-Reactive Protein (hs-CRP) were measured according to standard protocols in 2001, 2007, and 2013 to evaluate the profiles of CVDs risk factors. A Bayesian multidimensional Graded Responses Linear Mixed Model was used for data analysis. Results: At baseline, the participants’ mean (SD) age was 50.09(11.21), and 49.5% of them were male. Three latent profiles of CVDs risk factors were derived: (i) Fit Pre-Metabolic Syndrome (FPMS) profile characterized by normal anthropometric indices and some impaired metabolic risk factors; (ii) DysLipoproteinemia Central Obese (DLCO) profile with abdominal obesity and impaired low-density lipoprotein cholesterol as well as other normal risk factors; (iii) Impaired Laboratory Inflammatory State (ILIS) profile with impaired high-density lipoprotein cholesterol and hs-CRP and other normal risk factors. In general, higher scores of the extracted latent profiles indicated more impaired function in the related risk factors. After controlling for various potential fixed and time-varying confounding variables, a significant positive longitudinal association was found between FPMS, DLCO, and ILIS profiles and DQI (β (95% CrI): 0.26 (0.03,0.51), 0.14 (0.01,0.27), and 0.24 (0.11,0.38), respectively), demonstrating that lower overall diet quality was associated with more impaired function of the related risk factors.Conclusions: Diet quality is associated with all emerging profiles of CVDs risk factors. Increasing the knowledge of the community about the importance of the quality of consumed foods may help to prevent CVDs. It is recommended that further investigations, particularly interventional studies, be conducted to confirm our results.