A Mediterranean-style diet (MED) can promote people lengthen the span of life and avoid atherosclerotic cardiovascular disease (ASCVD) in primary prevention. Metabolic syndrome (MetS) can significantly reduce life expectancy and increase the risk of ASCVD. However, few studies have focused on the role of the Mediterranean diet in patients with MetS. Participants in the National Health and Nutrition Examination Survey (NHANES) with MetS (N = 8301) from 2007 to 2018 were examined. A 9-point evaluation scorewas used to measure the degree of adherence to the MED diet. In order to compare the various levels of adherence to the MED diet and the effects of the specific MED diet components on all-cause and cardiovascular mortality, Cox regression models were utilized. Among the 8301 participants with MetS, about 13.0% (1080 of 8301) died after a median follow-up of 6.3 years. In this study, participants with MetS with adherence to high-quality and moderate-quality Mediterranean diet were significantly associated with lower all-cause mortality as well as cardiovascular mortality during the follow-up period. Futhermore, in joint analysis of the Mediterranean diet and sedentary behavior or depression, we found that high-quality or moderate-quality Mediterranean diet could attenuate, even reverse the adverse effects of sedentary behavior and depression on all-cause and cardiovascular mortality in participants with MetS. Among the components of the MED diet, greater intakes of vegetables, legumes, nuts and high MUFA/SFA ratio were significantly associated with lower all-cause mortality and greater vegetables intake was significantly associated with lower cardiovascular mortality, while more red/processed meat intake was significantly associated with higher cardiovascular mortality in participants with MetS.