The effects of rare earth mining on rice biomass, rare earth element(REE) content and bacterial community structure was studied by pot experiment. The research showed that the REE content in rice roots, shoots and grains was significantly positive correlated with that in soil, and the dry weight of rice roots, shoots and grains was highly correlated with soil physical and chemical properties, nutrient elements and REE contents; The exploitation of rare earth minerals inhibited a-diversity of endophytic fungi in rhizosphere, root, phyllosphere and leaf of rice, significantly reduced the abundance index, OTU number, Chao, Ace index and also significantly reduced the diversity index-Shannon index and Inv-Simpson index, also reduced uniformity index: Pielou’s evenness index, Simpson’s evenness index, etc, which caused β-diversity of bacteria to be quite different. The exploitation of rare earth minerals reduces the diversity of bacteria, but forms dominant bacteria, such as Burkholderia, Bacillus, Buttiauxella, Acinetobacter, Bradyrhizobium, Candida koribacter, which can degrade the pollutants formed by exploitation of rare earth minerals, alleviate the compound pollution of rare earth and ammonia nitrogen, and also has the function of fixing nitrogen and resisting rare earth stress; The content of soil available phosphorus in non mining area is low, forming the dominant bacteria of Pantoea, which has the function of improving soil phosphorus availability. Rare earth elements and physical and chemical properties of soil affect the community structure of bacteria in rhizosphere and phyllosphere of rice, promote the parallel movement of some bacteria in rhizosphere, root, phyllosphere and leaf of rice, promote the construction of community structure of bacteria in rhizosphere and phyllosphere of rice, give full play to the growth promoting function of Endophytes, and promote the growth of rice. The results showed that the rice biomass in mining area was guaranteed due to the growth promoting effect of endophytic bacteria, However, the mining of mineral resources causes the compound pollution of rare earth and ammonia nitrogen, which makes REE content of rice in mining area significantly higher than that in non mining area.