Objective Sterol 14α-demethylase (CYP51), a key enzyme in the plant sterol biosynthesis pathway, plays an important role in plant responses to abiotic stress. This study is aimed to identify CYP51 gene family members genome-wide in Asparagus, analyze their molecular characteristics, and validate the function of AtaCYP51G2 from Asparagus taliensis in response to abiotic stress, thereby providing a basis for understanding the molecular mechanisms of stress resistance in Asparagus plants. Method Bioinformatic methods were used to identify CYP51 family members in A. taliensis, A. officinalis, and A. setaceus. Their physicochemical properties,chromosomal localization, gene duplication, phylogenetic relationships, gene structures, and cis-acting elements in promoter regions were analyzed. Transgenic Arabidopsis thaliana lines overexpressing AtaCYP51G2 were generated, and phenotypic observations and physiological/biochemical measurements were performed under drought, salt, and osmotic stress conditions. Real-time quantitative PCR was employed to detect the expression levels of the target gene in transgenic lines and the changes in AtaCYP51G2 expression under stress treatments. Result Four CYP51 gene family members were identified in Asparagus species. Promoter analysis revealed the presence of hormone- and stress-responsive cis-acting elements, which were particularly abundant in the AtaCYP51G2 promoter. Subcellular localization experiments indicated that the AtaCYP51G2 protein is localized to the endomembrane system. The overexpression of AtaCYP51G2 enhanced the tolerance of transgenic Arabidopsis to drought and osmotic stress and partially alleviated oxidative damage under salt stress. Conclusion The AsparagusCYP51 gene family has a small number of members and is highly conserved in terms of gene structure and protein sequence. The overexpression of AtaCYP51G2 enhances the tolerance of transgenic Arabidopsis to drought, salt, and osmotic stress, providing a theoretical basis and potential genetic resources for improving stress resistance in Asparagus plants.