Eremosparton songoricum (Litv.) Vass. is a desert legume exhibiting extreme drought tolerance and the ability to withstand various harsh environments, making it a good candidate for investigating stress tolerance mechanisms and exploring valuable stress-resistant genes. However, the absence of a genetic transformation system for E. songoricum poses significant limitations for functionally validating these stress-resistant genes in situ. In this study, we developed an Agrobacterium-mediated transient transformation system for E. songoricum utilizing the β-glucuronidase (GUS) gene as a reporter. We investigated three types of explants (seedlings, assimilated branches and callus) and the effects of different Agrobacterium strains, seedling ages, OD600 values, acetosyringone (AS) concentrations, sucrose concentrations and infection times on the transformation efficiency. The results reveal that the optimal transformation system was infecting one-month-old regenerating assimilated branches with the Agrobacterium strain C58C1. The infection solution comprised 1/2 MS medium with 3% sucrose and 200 μM AS at an OD600 of 0.8, infection for 3 h and then followed by 2 days of dark cultivation, which achieving a maximum transformation rate of 97%. The maximum transformation rates of the seedlings and calluses were 57.17% and 39.51%, respectively. Moreover, we successfully utilized the assimilated branch transient transformation system to confirm the role of the previously reported transcription factor EsDREB2B in E. songoricum. The overexpression of EsDREB2B enhanced drought tolerance by increasing the plant’s reactive oxygen species (ROS) scavenging capacity in situ. This study established the first transient transformation system for a desert legume woody plant, E. songoricum. This efficient system can be readily applied to investigate gene functions in E. songoricum. It will expedite the exploration of genetic resources and stress tolerance mechanisms in this species, offering valuable insights and serving as a reference for the transformation of other desert plants and woody legumes.