Atherosclerosis and its associated cardiovascular diseases (CVDs) are serious threats to human health and have been reported to be associated with the gut microbiota. Recently, the role of berberine (BBR) in atherosclerosis and gut microbiota has begun to be appreciated. The purposes of this study were to observe the effects of high or low doses of BBR on atherosclerosis and gut microbiota modulation, and to explore their correlation in ApoE −/− mice fed a high-fat diet. A significant decrease in atherosclerotic lesions was observed after treatment with BBR, with the effect of the high dose being more obvious. Both BBR treatments significantly reduced total cholesterol, APOB100, and very low-density lipoprotein cholesterol levels but levels of high/lowdensity lipoprotein cholesterol and lipoprotein (a) were only reduced by high-dose BBR. Decreased pro-inflammatory cytokines tumor necrosis factor-alpha, interleukin (IL)-1β, IL-6 and increased anti-inflammatory IL-10 and adiponectin levels were observed in the high-dose BBR group, but no decrease in IL-6 or increase in IL-10 was evident using the low-dose of BBR. 16S rRNA sequencing showed that BBR significantly altered the community compositional structure of gut microbiota. Specifically, BBR enriched the abundance of Roseburia, Blautia, Allobaculum, Alistipes, and Turicibacter, and changed the abundance of Bilophila. These microbiota displayed good anti-inflammatory effects related to the production of short-chain fatty acids (SCFAs) and were related to glucolipid metabolism. Alistipes and Roseburia were significantly enriched in high-dose BBR group while Blautia and Allobaculum were more enriched in low-dose, and Turicibacter was enriched in both BBR doses. Metagenomic analysis further showed an elevated potential for lipid and glycan metabolism and synthesis of SCFAs, as well as reduced potential of TMAO production after BBR treatment. The findings demonstrate that both high and low-dose BBR can improve serum lipid and systemic inflammation levels, and alleviate atherosclerosis induced by high-fat diet in ApoE −/− mice. The effects are more pronounced for the high dose. This anti-atherosclerotic effect of BBR may be partly attributed to changes in composition and functions of gut microbiota which may be associated with anti-inflammatory and metabolism of glucose and lipid. Notably, gut microbiota alterations showed different sensitivity to BBR dose.