Riparian plants exhibit strong antioxidant capacity due to the constant periodic flooding and the resulted oxidative stress. The aim of this study was to determine whether the endophytes are involved in oxidative stress pathway of the host. In the study, we isolated the endophytic fungi from a shrub of Salix variegate before and after natural flooding, and characterized through taxonomical characterization of 18S ITS sequences. By means of total antioxidant capacity (TAC) method, we assessed the antioxidant activity of all isolates. Under different oxygen supply levels, a total of 115 culturable fungi were obtained from various tissues, grouped into 6 classes and 26 genera, showing abundant biodiversity. Aspergillus spp. and Penicillium spp. constituted the dominant population. However, the endophyte community was significantly affected by flooding stress. The fungi in post-flooding population were more numerous and biodiverse, especially the genus Aspergillus. The dominant genera had relatively higher activity than others whether in means or maxima, especially in the genera of Aspergillus after flooding. Our results indicated that flooding would change the population composition of endophyte strains with high antioxidant activity and enhance the antioxidant capacity of Aspergillus, which maybe conversely participate the oxidative pathway in the host.