Heavy metal hyperaccumulation is prevalent throughout plant evolution, particularly in the legume family (Fabaceae), and acts as a presumed chemical defense against herbivory. However, heavy metal hyperaccumulation can have non-target impacts on other biological interactors including plant-microbe interactions. This information is important given the interest in utilizing legume plants for phytoremediation of anthropogenically contaminated soils. Here we employ a greenhouse experiment manipulating selenium level along with 16S amplicon sequencing methods to explore the effect of selenium on the prokaryotic microbiome of the selenium hyperaccumulator Astragalus crotalariae and non-accumulator Astragalus lentiginosus var. borreganus. Regardless of hyperaccumulator status, both plants accumulated high levels of selenium in leaf tissue when grown on soils with high selenium levels. However, the effect of selenium on the prokaryotic communities was more drastic in A. lentiginosus than A. crotalariae, explaining 37.57% of the observed variation and significantly affected community diversity and evenness. Many individual microbes were affected by selenium addition; notably, Mesorhizobium the nodulation-inducing genera of Astragalus spp., appeared in significantly less abundance in roots of both plant species grown on highly seleniferous soils. This project highlights the potential significance of ecological partners in heavy metal accumulating plants and the necessity of their consideration when using these plants for phytoremediation.