Inflammatory immune response is apparently one of the determinants of progressive exacerbation of valvular atrial fibrillation(VAF). Ferroptosis, an iron-dependent modality of regulated cell death, is involved in the immune regulation of cardiovascular disease. However, the relevant regulatory mechanisms of immune infiltration and ferroptosis in VAF have been less studied. In the current study, a highly efficient system for screening immunity- and ferroptosis-related biomarkers and immunomodulatory ability of herbal ingredients has been developed with the integration of intelligent data acquisition, data mining, network pharmacology, and computer-assisted target fishing. VAF patients showed higher infiltration of neutrophils and resting stage dendritic cells, while VSR patients showed higher infiltration of follicular helper T cells. In addition, six (e.g., PCSK2) and 47 (e.g., TGFBR1) ImmDEGs and one (SLC38A1) and four (TGFBR1, HMGB1, CAV1, and CD44) FerDEGs were highly expressed in patients with valvular sinus rhythm (VSR) and VAF, respectively. We further identified a core subnetwork containing 34 hub genes, which were intersected with ImmDEGs and FerDEGs to obtain the key gene TGFBR1. Based on TGFBR1, 14 herbs (e.g., Fructus zizyphi jujubae, Semen Juglandis, and Polygonum cuspidatum) and six herbal ingredients (curcumin, curcumine, D-glucose, hexose, oleovitamin A, and resveratrol) were predicted. Finally, TGFBR1 was found to dock well with curcumin and resveratrol, and it was further verified that curcumin and resveratrol could significantly reduce myocardial fibrosis. We believe that herbs rich in curcumin and resveratrol such as Rhizoma curcumae longae and Curcuma kwangsiensis, mitigate myocardial fibrosis to improve VAF by modulating the TGFβ/Smad signaling pathway. This strategy provides a prospective approach systemically characterizing phenotype-target-herbs relationships based on the tissue-specific biological functions in VAF and brings us new insights into the searching lead compounds from Chinese herbs.