Hepatic encephalopathy is a disorder of brain function caused by liver failure and the buildup of toxic substances. Ammonia produced during protein breakdown in the gut cannot be removed by the damaged liver and crosses into the brain. Symptoms range from confusion to coma. Treatment aims to reduce ammonia levels through a low-protein diet, lactulose to increase ammonia excretion, antibiotics to treat gut infections, and medications to stimulate ammonia metabolism. Prognosis depends on the severity and reversibility of the underlying liver disease.