BACKGROUND: Visceral adiposity index (VAI) and diets are associated with the risk of cardiovascular disease (CVD). It is unclear how well VAI and diet predict CVD. METHODS: Data were obtained from the National Health and Nutrition Examination Survey (NHANES 2017-2018). Demographic data, diets, biochemical examination, and questionnaire information were collected. VAI was calculated using body mass index, waist circumference, triglycerides, and high-density lipoprotein cholesterol. Binary logistic regression was adopted to examine the correlation of VAI and diets with CVD. A decision tree model was developed to predict CVD risk according to different factors. RESULTS: 2104 participants (mean age: 50.87 ± 17.35 years, 48.38% males) were included. Participants with high levels of VAI (≥ 2.18) had an elevated risk of CVD compared to those with low levels of VAI (≤ 0.76) (OR = 1.654, 95% CI: 1.025-2.669, P = 0.039). Compared with the low protein intake level (≤ 50.34 g), the upper intermediate (72.10-99.92 g) (OR = 0.445, 95% CI: 0.257-0.770, P = 0.004) and high (≥ 99.93 g) levels of protein intake (OR = 0.450, 95% CI: 0.236-0.858, P = 0.015) reduced CVD risk. The decision tree model unveiled that VAI, protein intake, and dietary fiber intake were predictors for CVD. CONCLUSION: VAI and protein intake levels are independently associated with CVD risk and have predictive power for CVD. These findings can provide insights into the development of appropriate lifestyle and treatment strategies for patients to reduce the incidence of CVD.