The presence of complex components in Chinese herbal medicine (CHM) hinders identification of the primary active substances and understanding of pharmacological principles. This study was aimed at developing a big-data-based, knowledge-driven in silico algorithm for predicting central components in complex CHM formulas. Network pharmacology (TCMSP) and clinical (GEO) databases were searched to retrieve gene targets corresponding to the formula ingredients, herbal components, and specific disease being treated. Intersections were determined to obtain disease-specific core targets, which underwent further GO and KEGG enrichment analyses to generate non-redundant biological processes and molecular targets for the formula and each component. The ratios of the numbers of biological and molecular events associated with a component were calculated with a formula, and entropy weighting was performed to obtain a fitting score to facilitate ranking and improve identification of the key components. The established method was tested on the traditional CHM formula Danggui Sini Decoction (DSD) for gastric cancer. Finally, the effects of the predicted critical component were experimentally validated in gastric cancer cells. An algorithm called Chinese Herb Medicine-Formula vs. Ingredients Efficacy Fitting & Prediction (CHM-FIEFP) was developed. Ferulic acid was identified as having the highest fitting score among all tested DSD components. The pharmacological effects of ferulic acid alone were similar to those of DSD. CHM-FIEFP is a promising in silico method for identifying pharmacological components of CHM formulas with activity against specific diseases. This approach may also be practical for solving other similarly complex problems. The algorithm is available at http://chm-fiefp.net/.