BackgroundSarcopenia is a common complication of fatty liver, and sarcopenia increases the risk of advanced liver fibrosis in patients with Metabolic dysfunction-associated fatty liver disease (MAFLD). Chronic inflammation is the crucial link between sarcopenia and fatty liver. An anti-inflammatory diet is expected to be an essential measure to prevent sarcopenia in patients with fatty liver, and the dietary inflammatory index (DII) is a crucial tool for assessing the inflammatory potential of diets. However, the relationship between DII and sarcopenia in patients with fatty liver is unclear.ObjectiveThis study investigated the correlation between the dietary inflammatory index (DII) and sarcopenia in patients with Metabolic dysfunction-associated fatty liver disease (MAFLD).MethodsData for this study were obtained from the National Health and Nutrition Examination Survey (NHANES) 2017–2018, with 917 patients with MAFLD participating in the study. Participants were divided into three groups based on DII tertiles: group T1 (n = 305), group T2 (n = 306), and group T3 (n = 306), and binary logistic regression was used to assess the relationship between DII and sarcopenia with stratified analyses based on the weights recommended by the NHANES and multivariate linear regression was used to evaluate the association of DII with total appendicular lean mass.ResultsAfter adjusting for all confounders, DII was significantly and positively associated with the risk of sarcopenia in women [OR: 1.61, 95% CI: (1.226, 2.06), p < 0.001]. The risk of sarcopenia was higher in the T3 group compared to the T1 group [OR: 4.04, 95% CI: (1.66, 9.84), p = 0.002]. DII was negatively associated with appendicular lean mass adjusted for body mass index in both men and women.ConclusionDII was significantly associated with the risk of sarcopenia in female patients with MAFLD, with higher DII scores related to a higher risk of sarcopenia. Higher DII scores related to a higher risk of sarcopenia in men with significant fibrosis.