IntroductionHypericum perforatum L. (HPL) is extensively researched domestically and internationally as a medicinal plant. However, no reports of studies related to the anticoagulant activity of HPL have been retrieved. The specific bioactive components are unknown.ObjectiveThe aim of this study was to develop a machine learning (ML) method for rapid prediction of anticoagulant activity in HPL and evaluation of compound activity. Materials and methods.First, an in vitro anticoagulant activity assay was developed for the determination of the bioactivity of various medicinal parts of HPL. Then, the peak areas of compounds in HPL were integrated using UPLC‐Q‐TOF‐MS analysis. Subsequently, nine independent ML methods and two ensemble learning methods have been established to predict the anticoagulant activity of HPL and to evaluate the contribution of compounds. Feature importance scores were used for models visualization.ResultsA total of 24 compounds were shown to exhibited superior anticoagulant activity. Molecular docking experiments likewise confirmed this result. The results show that the branches of HPL have excellent anticoagulant activity, which has been previously overlooked. The established ML model demonstrated good performance in the prediction of the activity of HPL.ConclusionThe results were accurate and reliable, which significantly improved the efficiency of active compounds screening, and further exploration in this area is warranted.