Background and aims: Male Populus cathayana individuals alleviate the stress-induced damage on females when both sexes of plant individuals grow together compared with the female-female competition relationship. However, it is still largely unknown how microbiota associated with roots are regulated by intra- and inter-sexual plant competition that affect the plant ecology, such as the ability to mitigate stressors. Methods: Bacterial communities in the rhizosphere and root endosphere were investigated in intra-sexual competition male-male, female-female and inter-sexual competition male-female of the dioecious species P. cathayana under different availabilities of water. Results: Female P. cathayana individuals were more strongly subjected to competition from a same sex neighbor and suffered more severe damage by drought compared with the males in male-male competition. More carbon deprived from roots was assimilated by soil microorganisms in female-female competition than male-female and male-male competitions under conditions of adequate water. Changes in neighbor effect were a driving force in regulating the bacterial community in the rhizosphere and endosphere. This study found that male-male, female-female and male-female competitions recruited large numbers of unique operational taxonomic units and largely influenced bacterial β-diversity. Moreover, the inter-sexual competition highly increased the association between species of the bacterial network. Male neighbors favored colonization of the female roots by the growth promoting taxa Streptomyces and Phyllobacterium. Conclusions: It was emphasized that the beneficial roles of males in alleviating the drought-induced damage on females was associated with root microbiota, which were impacted by the sexual identity of neighbor under drought.