Achnatherum inebrians, a perennial grass, is widely distributed in China. When infected by the endophyte Epichloë gansuensis, A. inebrians produces an abundance of alkaloids that enhance plant survival but are toxic to animals. Here we used in vitro fermentation to study the impact of endophyte- infected A. inebrians (E+) addition on rumen fermentation characteristics and on microbial community and diversity as assessed with amplicon sequencing technology. We examined E+ addition at five levels, E0, E25, E50, E75, and E100, corresponding to 0%, 25%, 50%, 75%, and 100% of the fermentation substrate, respectively. Both the fermentation characteristics and rumen microbial community structure differed significantly among treatments. E100 resulted in the highest values for pH, the Shannon index, Kiritimatiellaeota, and Lentisphaerae levels relative to the other treatments. In contrast, E25 was associated with higher levels of ammonia nitrogen, total volatile fatty acid, propionate, butyrate, isobutyrate, valerate, of the phyla Bacteroidetes and Firmicutes, and of the genus Prevotella_1, Succiniclasticum, Family_XIII_AD3011_group, Rikenellaceae_RC9_gut_group, Prevotellaceae_UCG-001, and Pyramidobacter as compared with other treatments. E50 resulted in the greatest values for the abundance-based coverage estimator (ACE) and the Chao1 index as compared with other treatments. E0 resulted in the greatest values for digestibility of dry matter, gas production, acetate, and Ruminobacter as compared with other treatments. This approach avoided animal toxicity experiments and confirmed that rumen fermentation characteristics and rumen microbiota were affected by E+ toxin. Therefore, E25 showed higher abundance in Prevotella_1, Prevotellaceae_ UCG-001, and Lachnospiraceae_XPB1014_group that implied they should play significant roles in E+ alkaloids degradation. And then, we can infer that rumen microorganisms should function as an antidote with respect to this poisoning reaction at moderate dietary percentages of E+.