The identification and functional analysis of key stress tolerance-related genes are of paramount importance in elucidating mechanisms regulating plant responses and adaptation to environmental stresses. Significant progress has been achieved in mining stress tolerance-related genes through the integrative analysis of metabolome and other omics data. However, methodologies for the precise identification of secondary metabolites still require further refinement. This study introduces a novel approach for discovering critical stress tolerance-related genes by integrating isolation and identification of drought-responsive secondary metabolites and transcriptome analysis (IISMTA). Using this approach, four drought-responsive metabolites (RMs), namely formononetin, afrormosin, ononin, and wistin, were isolated from Onobrychis viciifolia and further characterized by chromatography, high-resolution mass spectrometry (HRMS) and nuclear magnetic resonance (NMR) technologies. Only formononetin was identified, while the latter three were undetected in a widely-targeted metabolome analysis, indicating the novelty of our approach. A correlational analysis between proposed biosynthetic pathways of RMs and transcriptome data of drought-stressed vs. non-stressed O. viciifolia seedlings was conducted to identify the genes involved. Among the upregulated genes potentially involved, OvIF7GT, encoding an isoflavone glycosyltransferase, was ectopically expressed in Arabidopsis thaliana to assess its functional role in the biosyntheses of these compounds and plant drought adaptation. Results indicated that OvIF7GT transgenic plants showed increased total flavonoid contents and drought tolerance that was associated with enhanced antioxidant defense and osmoprotection, and reduced oxidative damage. Therefore, the IISMTA developed in this study is a valuable complement to the existing gene and metabolite discovery approaches.