The UDP-glucose 4-epimerase (UGE) enzyme plays a critical role in plant growth and responses to abiotic stressors, such as heavy metal exposure. However, UGE-mediated remodeling of cell wall polysaccharides in response to these stressors remains poorly understood in willow. This study investigated the structure, function, and expression patterns of the UGE gene family in willow, focusing on cadmium treatment to elucidate how SpUGE1 enhances Cd resistance. Six SpUGE genes were identified through whole-genome sequencing and bioinformatics analysis, and they were mapped across five chromosomes. Quantitative PCR analysis revealed that, with the exception of SpUGE3, all genes showed their highest relative expression in the leaves. Under Cd treatment, members of the SpUGE gene family displayed varying levels of responsiveness, with SpUGE1 showing a marked increase in expression over time. In transgenic Arabidopsis thaliana overexpressing SpUGE1, the cellulose, hemicellulose, lignin, and pectin content significantly increased, with cellulose levels rising by >50 % and pectin by approximately 30 %. This overexpression conferred enhanced Cd resistance by increasing cell wall thickness through elevated cell wall polysaccharides, which reduced Cd uptake. Consequently, Cd content in the cell wall, chloroplasts, and mitochondria was significantly lower than that in wild-type plants, reducing cellular damage and improving Cd resistance. Overall, this study provides valuable theoretical and experimental insights into the role of the SpUGE1 gene family in willow.