Metallophytes microbiota play a key role in plant growth and resistance to heavy metal stress. Comparing to the well-studied single or some specific plant growth-promoting (PGP) bacterial strains, our current understanding of the structural and functional variations of microbiome of metallophytes is still limited. Here, we systematically investigated the endophytic and rhizosphere bacterial community profiles of a metallophyte Commelina communis growing in different Cu-polluted soils by high-throughput sequencing technology. The results showed that the rhizosphere communities of C. communis exhibited a much higher level of diversity and richness than the endosphere communities. Meanwhile, shifts in the bacterial community composition were observed between the rhizosphere and endosphere of C. communis, indicating plant compartment was a strong driver for the divergence between rhizosphere and endosphere community. Among the environmental factors, soil Cu content, followed by OM, TP and TN, played major roles in shaping the bacterial community structure of C. communis. At the highly Cu-contaminated site, Pseudomonas and Sphingomonas were the predominant genera in the endophytic and rhizospheric bacterial communities, respectively, which might enhance copper tolerance as PGP bacteria. In summary, our findings will be useful to better understand metallophyte–microbe interactions and select suitable bacterial taxa when facilitating phytoremediation.