Long-term plant residue retention can effectively replenish soil quality and fertility. In this study, we collected rhizosphere soil from the residual roots of annual Cenchrus fungigraminus in the Ulan Buh Desert over the past 10 years. The area, depth, and length of these roots decreased over time. The cellulose content of the residual roots was significantly higher in the later 5 years (2018-2022) than the former 5 years (2013-2017), reaching its highest value in 2021. The lignin content of the residual roots did not differ across samples except in 2015 and reached its highest level in 2021. The total sugar of the residual roots in 2022 was 227.88 ± 30.69 mg·g-1, which was significantly higher than that in other years. Compared to the original sandy soil, the soil organic matter and soil microbial biomass carbon (SMBC) contents were 2.17-2.41 times and 31.52-35.58% higher in the later 3 years (2020-2022) and reached the highest values in 2020. The residual roots also significantly enhanced the soil carbon stocks from 2018-2022. Soil dehydrogenase, nitrogenase, and N-acetyl-β-D-glucosidase (S-NAG) were significantly affected from 2019-2022. The rhizosphere soil community richness and diversity of the bacterial and fungal communities significantly decreased with the duration of the residual roots in the sandy soil, and there was a significant difference for 10 years. Streptomyces, Bacillus, and Sphigomonas were the representative bacteria in the residual root rhizosphere soil, while Agaricales and Panaeolus were the enriched fungal genera. The distance-based redundancy analysis and partial least square path model results showed that the duration of residual roots in the sandy soil, S-NAG, and SMBC were the primary environmental characteristics that shaped the microbial community. These insights provide new ideas on how to foster the exploration of the use of annual herbaceous plants for sandy soil improvement in the future.