We explored the effects of straw returning to the field and different rare earth stresses on soil core microbial communities and their functions, by adding 0, 500 and 1000 mg·kg
-1 of La of light rare earth element (REE), Gd of medium REE, and Y of heavy REE; 1% and 2% rice straw to the corresponding PVC barrels respectively (each barrel contained 1000 g of soil). Results showed that different types and contents of REEs and different proportions of rice straw, affected the relative abundance, indicative species and core species of bacteria. Rare earth content had the greatest impact, followed by rare earth type and straw incorporation proportion. The core microbial community was determined based on the relative abundance and related functions of bacteria. The core microbial phyla of the samples added with 1% and 2% rice straw and 0 mg·kg
-1 and 500 mg·kg
-1 La, Gd, and Y were Firmicutes, Proteobacteria, Actinobacteriota, Acidobacteriota, Bacteroidota and Chloroflexi, and the core bacterial genera were
Anaerolina,
Oxobacter,
Bacillus,
Candidatus Koribacter,
Clostridium sensu stricto 8,
Ruminiclostridium,
Candidatus Solibacter,
Pseudobacteroides,
Novosphingobium,
Ammoniphilus,
Alicyclobacillus,
Cellulomonas, and
Bradyrhizobium. The core phyla of samples added with 1% and 2% rice straw, 1000 mg·kg
-1 La and Gd were Firmicutes, Proteobacteria, Bacteroidota, and Actinobacteriota. The core bacterial genera were
Bacillus,
Cellulomonas,
Geodermatophilus, and
unclassified_f_Acetobacteraceae. The core bacterial phyla of the samples added with 1% and 2% rice straw and 1000 mg·kg
-1 Y were Firmicutes and Actinobacterota, and the core bacterial genera were
Bacillus and
Alicyclobacillus. The samples added with 1000 mg·kg
-1 Y and 1% and 2% rice straw showed the most significant difference in bacterial function compared to other samples, followed by samples added with 1000 mg·kg
-1 La and Gd. Compared to other samples, the soil bacteria added with Gd showed significantly lower functions in human diseases, metabolism, cellular processes, environmental information processing, and biological systems. The bacterial disease pathways of samples added with 1000 mg·kg
-1 Y and 1% and 2% rice straw were significantly smaller than those of other samples. The heavy REE in the soil reaching 1000 mg·kg
-1 has a significant impact on the core microbial community, while 2% of straw returning to the field can reduce the stress of rare earths on the environment.