Skeletal muscle is known to play a role in hepatic encephalopathy. Fatty infiltration of the muscle (myosteatosis) and muscle mass depletion (sarcopenia) are frequent complications of cirrhosis. The purposes of the study were to investigate if myosteatosis and sarcopenia are associated with overt hepatic encephalopathy in patients with cirrhosis and to evaluate their impact on mortality. A total of 675 cirrhotic patients were studied. Computed tomography scans were used to analyze the skeletal muscle. Hepatic encephalopathy was defined by either a hepatic encephalopathy-related hospitalization and/or taking ammonia-lowering treatment (i.e., lactulose, rifaximin). Myosteatosis was observed in 348 patients (52%), sarcopenia in 242 (36%), and hepatic encephalopathy in 128 (19%) patients. Both myosteatosis (70 vs. 45%, p < 0.001) and sarcopenia (53 vs. 32%, p < 0.001) were more frequent in patients with hepatic encephalopathy. By multivariable regression analysis, both myosteatosis and sarcopenia were associated with a higher risk of hepatic encephalopathy, independent of the MELD score (OR 2.25; 95% CI, 1.32-3.85, p = 0.003 and OR 2.42; 95% CI, 1.43-4.10, p = 0.001, respectively). In univariate Cox proportional hazards analysis, sarcopenia (csHR 2.02; 95% CI, 1.57-2.58, p < 0.001), myosteatosis (csHR 1.45; 95% CI, 1.16-2.91, p = 0.004), and hepatic encephalopathy (csHR 1.61; 95% CI, 1.20-2.18, p = 0.002) were associated with mortality, but only sarcopenia was significant in the multivariable analysis (csHR 2.15; 95% CI, 1.52-3.05, p < 0.001). Myosteatosis and sarcopenia are independently associated with overt hepatic encephalopathy in patients with cirrhosis. The association between hepatic encephalopathy and mortality may be explained at least partially by the presence of sarcopenia. These results identify the importance of muscle mass and suggest therapeutic strategies to attenuate muscle mass loss and improve muscle quality.