Caragana, a dominant leguminous plant in the barren semi-fixed deserts of northern China, forms critical symbiotic nitrogen-fixing associations with Mesorhizobium, which are vital for ecosystem functioning globally. However, the genetic adaptation of Caragana-associated Mesorhizobium symbionts driven by membrane transporters and nucleotide repair genes remained poorly illustrated. Recognizing the pivotal roles of membrane transporters (cysW, exoY, idhA) and nucleotide repair genes (mutS, uvrC) in microbial environmental resilience, this study investigated the adaptive dynamics of 68 representative Mesorhizobium strains isolated from Caragana across five geographically distant areas (A–E) in this desert belt. Phylogenetic analyses based on the five target genes revealed that strains clustered primarily by genospecies rather than geographic origin, with high topological congruence between membrane transporter, nucleotide repair and core gene trees. Genetic differentiation and frequent interspecific gene flow were predominantly driven by recombination (over mutation), indicative of active horizontal gene transfer (HGT) as a key evolutionary force. Notably, despite geographic separation, strains from the same genospecies exhibited extensive sequence homology in both gene sets, suggesting shared adaptive traits disseminated through HGT. Collectively, our results demonstrated that Caragana-associated Mesorhizobium have evolved primarily through adaptive processes shaped by homogeneous harsh desert environments, rather than geographic isolation. The membrane transporters likely facilitated rapid acquisition of nutrient uptake and stress-tolerance traits via recombination, while nucleotide repair genes maintained genomic integrity under extreme conditions. This dual genetic strategy underscores how HGT and purifying selection synergistically drive ecological adaptation in desert microbiomes.