Flavonol synthase (FLS) plays a vital role in flavonol biosynthesis in plants, crucial in their growth, development, and ability to withstand abiotic stress. However, a comprehensive analysis of the FLS gene family and its role in alfalfa (Medicago sativa L.) under cold stress remains unexplored. Therefore, this study aims to employ bioinformatics methods, integrating various databases and computational tools, to systematically investigate the MsFLSs gene family across the entire alfalfa (Medicago sativa L) genome. Furthermore, qRT-PCR experiments were performed to validate expression patterns. Twenty MsFLS genes were identified and classified into five distinct subgroups based on their phylogenetic trees. Gene structure analysis revealed that alfalfa genes contained between one and five introns. The number of introns within members of the same evolutionary branch was generally consistent. The MsFLS promoter region contained a substantial number of hormone-responsive, stress-responsive, light-responsive, and tissue-specific regulatory elements. Additionally, approximately 95 % (19/20) of the alfalfa FLS genes underwent duplication events involving tandem and fragment replications across 47 replication events. Cold stress triggered the expression of the MsFLS gene family, with MsFLS7, MsFLS9, MsFLS10, MsFLS11, MsFLS13, MsFLS16, MsFLS17 and MsFLS18 showing significant upregulation. The overexpression of MsFLS13 significantly improved cold stress tolerance and antioxidant capacity and reduced membrane oxidative damage in alfalfa. These findings offer valuable insights for future research on the functional role of MsFLS genes in response to cold stress in alfalfa.