Background: Liver cirrhosis (LC) is one of the chronic liver diseases with high disability and mortality accompanying hepatic encephalopathy (HE) followed by cognitive dysfunctions. In this work, the effect of berberine (Ber) on spatial cognition was studied in a rat model of LC induced by thioacetamide (TAA). Materials and Methods: Male Wistar rats (200–250 g) were divided into six groups: (1) control; (2) TAA, 200 mg/kg/day, i.p.; (3–5) TAA + Ber; received Ber (10, 30, and 60 mg/kg, i.p., daily after last TAA injection); (6) Dizocilpine (MK-801) + TAA, received MK-801 (2 mg/kg/day, i.p.) 30 m before TAA injection. The spatial memory, BBB permeability, brain edema, liver enzymes, urea, serum and brain total bilirubin, oxidative stress and cytokine markers in the hippocampus were measured. Furthermore, a histological examination of the hippocampus was carried out. Results: The BBB permeability, brain edema, liver enzymes, urea, total bilirubin levels in serum and hippocampal MDA and TNF-α increased significantly after TAA injection (p< 0.001); the spatial memory was impaired (p< 0.001), and hippocampal IL-10 decreased (p< 0.001). Ber reversed all the above parameters significantly (p< 0.05,p< 0.01 andp< 0.001). MK-801 prevented the development of LC via TAA (p< 0.001). Conclusion: Results showed that Ber improves spatial learning and memory in TAA-induced LC by improving the BBB function, oxidative stress and neuroinflammation. Ber might be a promising therapeutic agent for cognitive improvement in LC.