Bacterial wilt caused by Ralstonia solanacearum is a destructive disease that affects potato production, leading to severe yield losses. Currently, little is known about the changes in the assembly and functional adaptation of potato rhizosphere microbial communities during different stages of R. solanacearum infection. In this study, using amplicon and metagenomic sequencing approaches, we analyzed the changes in the composition and functions of bacterial and fungal communities in the potato rhizosphere across four stages of R. solanacearum infection. The results showed that R. solanacearum infection led to significant changes in the composition and functions of bacterial and fungal communities in the potato rhizosphere, with various microbial properties (including α,β-diversity, species composition, and community ecological functions) all being driven by R. solanacearum infection. The relative abundance of some beneficial microorganisms in the potato rhizosphere, including Firmicutes, Bacillus, Pseudomonas, and Mortierella, decreased as the duration of infection increased. Moreover, the related microbial communities played a significant role in basic metabolism and signal transduction; however, the functions involved in soil C, N, and P transformation weakened. This study provides new insights into the dynamic changes in the composition and functions of potato rhizosphere microbial communities at different stages of R. solanacearum infection to adapt to the growth promotion or disease suppression strategies of host plants, which may provide guidance for formulating future strategies to regulate microbial communities for the integrated control of soil-borne plant diseases.