Salinization is considered as a major environmental threat to agricultural systems. Infection with Epichloe fungal endophytes has been shown to increase tolerance to NaCl stress for several host grass species, but limited information is available regarding the effects of these endophytes under mixed salt (NaCl and Na2SO4) and mixed alkali (NaHCO3 and Na2CO3) stresses. Since these four compounds are considered very harmful to many inland areas in China, we conducted a study to determine the impact of Epichloe fungal endophyte infection on wild barley (Hordeum brevisubulatum) under both salt stress (SS) and alkali stress (AS). Wild barley with (E+) and without (E-) Epichloe endophyte was subjected to mixed salt (molar ratio of NaCl:Na2SO4 = 1:1) and mixed alkali (molar ratio of NaHCO3:Na2CO3 = 1:1) treatments (0, 100, 200, 300 and 400 mM). Photosynthetic parameters and chlorophyll content were measured after 21 days exposure to stress, and growth parameters, physiological indexes, sodium (Na+), potassium (K+), calcium (Ca2+), nitrogen (N), phosphorus (P) and carbon (C) contents were determined after 22 days exposure to stress. The harmful effect of alkali stress on the growth of wild barley was stronger than those of salt stress, irrespective of endophyte infection. Alkali stress had a greater impact on photosynthesis and chlorophyll content compared to salt stress and also accumulated more of the osmoprotectant glycine betaine. However, salt stress appeared to increase total antioxidant capacity as well as increasing K+ content (resulting in a relative low Na+/K+ ratio). Under alkali stress, Ca2+ content sharply increased in roots as opposed to a decrease under salt stress. In roots, the C, N, P contents and the C:N ratio was higher under salt stress compared to alkali stress whereas the C:P and N:P ratios were lower. In shoots, the N and P contents were higher under salt stress compared to alkali stress whereas the C content and the C:P and C:N ratios were lower. Interestingly, the presence of Epichloe endophyte infection on wild barley under both salt stress and alkali stress led to significant amelioration of both stresses. Epichloe infection significantly increased photosynthesis, chlorophyll content, total antioxidant capacity and glycine betaine content, whilst lowering leaf malondialdehyde content. Furthermore, Epichloe infection reduced Na+ content, the Na+/K+ ratio and shoot Ca2+ content but increased K+ content and the root Ca2+ content. Epichloe infected plants also had higher C, N and P contents but lower ratios of C:N, C:P and N:P than uninfected plants. The presence of the Epichloe endophyte suppresses the negative effect of salt stress and alkali stress on wild barley seedling growth. The possible mechanisms by which the presence of Epichloe endophyte enhances growth of plants exposed to those two stresses include improved photosynthetic ability, increased antioxidant potential, increased nutrient absorption, and osmotic and ionic adjustment. The study also found that alkali stress is more harmful to wild barley than salt stress.