AbstractHepatic encephalopathy (HE) is a neurological disease occurring in patients with hepatic insufficiency and/or portal-systemic blood shunting based on cirrhosis. The pathogenesis is not completely clear till now, but it is believed that hyperammonemia is the core of HE. Hyperammonemia caused by increased sources of ammonia and decreased metabolism further causes mental problems through the gut–liver–brain axis. The vagal pathway also plays a bidirectional role in the axis. Intestinal microorganisms play an important role in the pathogenesis of HE through the gut–liver–brain axis. With the progression of cirrhosis to HE, intestinal microbial composition changes gradually. It shows the decrease of potential beneficial taxa and the overgrowth of potential pathogenic taxa. Changes in gut microbiota may lead to a variety of effects, such as reduced production of short-chain fatty acids (SCFAs), reduced production of bile acids, increased intestinal barrier permeability, and bacterial translocation. The treatment aim of HE is to decrease intestinal ammonia production and intestinal absorption of ammonia. Prebiotics, probiotics, antibiotics, and fecal microbiota transplantation (FMT) can be used to manipulate the gut microbiome to improve hyperammonemia and endotoxemia. Especially the application of FMT, it has become a new treated approach to target microbial composition and function. Therefore, restoring intestinal microbial homeostasis can improve the cognitive impairment of HE, which is a potential treatment method.