By integrating network pharmacology with RF, SVM-RFE, and LASSO algorithms, this study identified that the therapeutic effect of BJJP on HF may be mediated by two signature genes, LYN and CFTR, which were further validated using a validation set. Here, CFTR is linked to hydrops fetalis.