Uridine diphosphate glycosyltransferases (UGTs) are enzymes that catalyze glycosylation modifications and play an essential role in regulating plant metabolism. Alfalfa (Medicago sativa L.) is the most important legume in the world due to its high yields and protein content; however, the UGT genes in alfalfa have not yet been studied. Identifying UGT genes with metabolic roles in alfalfa is essential for identifying and modifying genetic traits that are relevant to yield and quality. In this study, 90 of the 239 UGT genes identified from the alfalfa “Zhongmu No. 1” genome database were found to be related to secondary metabolism, and a series of gene family characterization analyses were conducted on each. The results demonstrated that all 90 UGT genes were unevenly distributed on eight chromosomes with few introns and that tandem duplications were the crucial driving force expanding the UGT family in alfalfa. Notably, the 90 UGT genes can be clustered into ten evolutionary groups which contain specific PSPG motifs, and genes in these ten groups have specific tissue expressions. This suggests that the UGT genes in each group could have similar glycosylation roles corresponding to analogous secondary metabolites in alfalfa. Additionally, multiple cis-acting elements found in MsUGT promoter regions, such as phytohormone and flavonoids, indicate that 90 UGT members could be induced by these features, which are also related to secondary metabolism. Therefore, our study identified 90 UGT members inten evolutionary groups that are likely related to glycosylation modifications with secondary metabolites in alfalfa. These findings help uncover pivotal regulatory mechanisms associated with secondary metabolism in plant yield and quality and contribute to genetic modification and breeding in alfalfa and other plant species.