Elevation of atmospheric CO2 combined with heavy metals can affect rhizosphere soil characteristics by altering the allocation of roots and its availability in the rhizosphere to the microbial community. The aim of study was to investigate the community structure of bacteria, fungi, ammonia oxidizing bacteria (AOB), and ammonia oxidizing archaea (AOA) in the rhizosphere of Robinia pseudoacacia L. seedlings after being exposed to elevated CO2 and cadmium (Cd) for 4 years. Elevated CO2 increased pH, total carbon, water-soluble organic carbon, and the carbon-to-nitrogen ratio under Cd exposure relative to Cd alone and led to a decrease in total and soluble Cd contents in rhizosphere soils. Elevated CO2 increased the richness of bacterial and AOA communities estimated by Abundance-based Coverage Estimator index by 17.4–63.2% and by 1.4–2.8%, respectively, and decreased fungal communities by 2.2–12.0% under Cd exposure. Elevated CO2 combined with Cd at 1.0 mg Cd kg−1 dry soil increased the diversity of bacterial, fungi, AOB, and AOA communities estimated by Shannon indexes, while at 5.0 mg Cd kg−1 dry soil, the diversity of these taxa decreased with the exception of bacterial. Elevated CO2 led to increased abundance of phyla Acidobacteria, Chloroflexi, Ascomycota, and Thaumarchaeota and to decreased abundance of phyla Proteobacteria and Actinobacteria in rhizosphere soils under Cd exposure; and the abundance of dominant taxa changed dramatically. NMDS and heat-map analysis of the relative abundance of genera indicated that elevated CO2 had a greater effect on microbial community structure when combined with Cd exposure. Additionally, elevated CO2 significantly affected microbial communities by increasing pH, TC, WSOC, and the C/N ratio and by decreasing total and soluble Cd contents in rhizosphere soils. Overall, elevated CO2 combined with Cd exposure increased the abundance of most microorganisms and changed microbial diversity in gene level as a result of increased nutrients in rhizosphere soils.