Rationale: Diabetes mellitus poses a substantial global health burden, necessitating novel therapeutic strategies. Astragalus membranaceus (AM), a traditional Chinese medicinal herb, has demonstrated potential in alleviating diabetic symptoms. This study aimed to investigate the mechanism of AM (root) extract in ameliorating diabetes and identify its bioactive components through advanced metabolomic and data-mining approaches. Methods: Untargeted metabolomics utilizing liquid chromatography-high resolution mass spectrometry (LC-HRMS), combined with quantitative spectrum-effect relationship analysis (QSERA), was applied to analyze AM (root) extract administered in oral experiments using the Leprdb/db mouse model. The AntDAS (Automatic Data Analysis Strategy) platform enabled screening of bioactive compounds from LC-HRMS fingerprints under heavily interfered background conditions. Molecular efficacy predictions for diabetes alleviation were derived via QSERA modeling. Results: 56 bioactive compounds associated with diabetic remediation were identified. Specific adjusting efficacies of bioactive compound on mouse diabetes were predicted by QSERA, proving that astragalus polysaccharide (APS) is the main medicinal component alleviating mouse diabetes and it may be as a potential insulin sensitizer for treating type II diabetes of human. Conclusion: Integrating LC-HRMS-based metabolomics and QSERA provides a systematic strategy to elucidate the pharmacodynamic basis of AM (root) extract, advancing the clinical translation of traditional Chinese medicine resources for diabetes management.