Liver cirrhosis (LC) is one of the most significant causes of morbidity and mortality in patients with chronic liver disease worldwide. Nutrition may be an important component of primary prevention of chronic liver disease. Diet-exercise patterns frame the eating behaviors and exercise habits of people through statistical methods related to nutritional epidemiology, which can explore the relationship between living habits and diseases among diverse populations. The purpose of this study was to explore the association between diet-exercise patterns and cirrhosis, and provide guidance on preventive diets for liver patients. This study identified diet-exercise patterns via clustering analysis of principal components and assessed their association with cirrhosis through the population samples of the National Health and Nutrition Examination Survey (NHANES) from 2017 to March 2020. We identified two diet-exercise patterns that were named the "prudent pattern" (consumption of various staple foods, eggs, meat, fruits and vegetables; less sedentary) and the "dangerous pattern" (higher consumption of desserts, nuts, milk, meat, alcoholic beverages; recreational activities). The t-test demonstrated a significant relationship between patterns and multiple foods. The simple logistic regression test showed a lower risk of cirrhosis in those in the "prudent pattern" (OR = 0.73, 95%CI = 0.59-0.93). Two diet-exercise patterns associated with cirrhosis were identified: "prudent pattern" and "dangerous pattern". The results of this study may be useful for suggesting preventive diets for people at risk of cirrhosis.