The MADS-box gene family is a transcription factor family that is widely expressed in plants. It controls secondary metabolic processes in plants and encourages the development of tissues like roots and flowers. However, the phylogenetic analysis and evolutionary model of MADS-box genes in Fagopyrum species has not been reported yet. This study identified the MADS-box genes of three buckwheat species at the whole genome level, and conducted systematic evolution and physicochemical analysis. The results showed that these genes can be divided into four subfamilies, with fragment duplication being the main way for the gene family expansion. During the domestication process from golden buckwheat to tartary buckwheat and the common buckwheat, the Ka/Ks ratio indicated that most members of the family experienced strong purification selection pressure, and with individual gene pairs experiencing positive selection. In addition, we combined the expression profile data of the MADS genes, mGWAS data, and WGCNA data to mine genes FdMADS28/48/50 that may be related to flavonoid metabolism. The results also showed that overexpression of FdMADS28 could increase rutin content by decreasing Kaempferol pathway content in hairy roots, and increase the resistance and growth of hairy roots to PEG and NaCl. This study systematically analyzed the evolutionary relationship of MADS-box genes in the buckwheat species, and elaborated on the expression patterns of MADS genes in different tissues under biotic and abiotic stresses, laying an important theoretical foundation for further elucidating their role in flavonoid metabolism.