The WHY family is a group of plant-specific transcription factors, that can bind to single-stranded DNA molecules and play a variety of functions in plant nuclei and organelles, participating in the regulation of plant leaf senescence. It has been identified and analyzed in many species, however, the systematic identification and analysis of the WHY genes family have not yet been reported in alfalfa (Medicago sativa L.). Therefore, to explore the function of alfalfa the WHY genes, and 10 MsWHY genes were identified and further characterized their evolutionary relationship and expression patterns by analyzing the recently published genome of alfalfa. Comprehensive analysis of the chromosome location, physicochemical properties of the protein, evolutionary relationship, conserved motifs, and responses to abiotic stresses of the WHY gene family in alfalfa using bioinformatics methods. The results showed that 10 MsWHY genes were distributed on 10 chromosomes, and collinearity analysis showed that many MsWHYs might be derived from segmental duplications, and these genes are under purifying selection. Based on phylogenetic analyses, the WHY gene family of alfalfa can be divided into four subfamilies: I-IV subfamily, and approximately all the WHY genes within the same subfamily share similar gene structures. The 10 MsWHY gene family members contained 10 motifs, of which motif 2 and motif 4 are the conserved motifs shared by these genes. Furthermore, the analysis of cis-regulatory elements indicated that regulatory elements related to transcription, cell cycle, development, hormone, and stress response are abundant in the promoter sequence of the MsWHY genes. Real-time quantitative PCR demonstrated that MsWHYs gene expression is induced by drought, salt, and methyl jasmonate. The present study serves as a basic foundation for future functional studies on the alfalfa WHY family.