Nutricines, the nutritionally active substances in feed, play a vital role in enhancing immune function, antioxidant activity, and feed efficiency in dairy cows. Identifying nutricines in total mixed ration (TMR) provides insights into feed quality and their impact on dairy cow health. However, due to the structural diversity of nutricines, data mining using multivariate variable models faces challenges in exploring their relationships. To address this, this study established a hierarchical clustering and optimization factor strategy for 13 common flavonoid peaks detected using apparent data and HPLC-DAD. The establishment of the flavonoid fingerprint of TMR diet in dairy cows detected 13 common peaks, five of which were found using standard products: p-coumaric acid, sinapic acid, tricin, and diosmetin. In vitro fermentation results using different TMR samples in substrate fermentation indicated that the dry matter disappearance rate, NH3-N, acetate, propionate, butyrate, isovalerate, and valerate changes varied significantly (p < 0.05). In spectrum–activity relationship studies, P2, P6, P8, P9, P10, and P11 were all considered possible factors causing this effect. In the analysis of optimization factor strategy, the peak spectrum model of four fermentation parameters, i.e., pH, dry matter digestibility, NH3-N, and acetate, was constructed after optimization (p < 0.05), and the data model is listed in the main text. In structure–activity relationship studies, ferulic acid, isoferulic acid, methyl sinapic acid, methyl 4-hydroxycinnamate, and p-hydroxybenzalacetone may serve as candidate references for compound 10 and may play an important role in affecting the digestibility of dry matter in in vitro fermentation. These findings highlight the role of flavonoids in TMR feed as key factors in maintaining dairy cow health and differentiating nutritional value. This study proposes a novel method for future TMR diet formulation and quality evaluation, with potential implications for improving dairy cow health and performance. Further research is needed to validate these findings and elucidate the mechanisms underlying nutricine effects on dairy cow nutrition and health.