Objective: To investigate the effect of berberine (BBR) on intestinal barrier function in nonalcoholic fat liver disease (NAFLD) in rats. Materials and Methods: Rats were divided into three groups: normal diet group (control group [CON group]), high-fat diet feeding group (HFD group), and HFD with BBR group. After 8 weeks of HFD feeding, rats in the BBR group were given BBR intragastrically at a dose of 150 mg/kg daily for 4 weeks. The same volume of normal saline was given to the CON and HFD groups. Liver index was detected, and Sudan black B staining was used to study fatty degeneration, also the expression level of occluding and intestinal flora was analyzed. Results: BBR administration significantly reduced HFD-induced increase in body weight (CON group: 379.83 ± 61.51 g, HFD group: 485.24 ± 50.15 g, and BBR group: 428.60 ± 37.37 g). It obviously alleviated the HFD-induced liver fatty degeneration and histopathological changes of intestinal mucosa according to liver index low-density lipoprotein-cholesterol, high-density lipoprotein-cholesterol, and total cholesterol (P < 0.05). The triglyceride, alanine transaminase, and aspartate aminotransferase levels were greatly elevated after BBR treatment (P < 0.05); while endotoxin, intestinal fatty acid-binding protein, and tumor necrosis factor-α were significantly reduced (P < 0.05). Moreover, we found that BBR could obviously elevate the level of occludin and decrease the level of Faecalibacterium prausnitzii and upregulate the level of bacteroides. Conclusion: BBR provides significant protection in NAFLD through ameliorating intestinal barrier function.