Multi-components Traditional Chinese Medicine (TCM) treats various complex diseases (multi-etiologies and multi-symptoms) via herbs interactions to exert curative efficacy with less adverse effects. However, the ancient Chinese compatibility theory of herbs formula still remains ambiguous. Presently, this combination principle is dissected through a systems pharmacology study on the mechanism of action of a representative TCM formula, Huo-xiang-zheng-qi (HXZQ) prescription, on the treatment of functional dyspepsia (FD), a chronic or recurrent clinical disorder of digestive system, as typical gastrointestinal (GI) diseases which burden human physical and mental health heavily and widely. In approach, a systems pharmacology platform which incorporates the pharmacokinetic and pharmaco-dynamics evaluation, target fishing and network pharmacological analyses is employed. As a result, 132 chemicals and 48 proteins are identified as active compounds and FD-related targets, and the mechanism of HXZQ formula for the treatment of GI diseases is based on its three function modules of anti-inflammation, immune protection and gastrointestinal motility regulation mainly through four, i.e., PIK-AKT, JAK-STAT, Toll-like as well as Calcium signaling pathways. In addition, HXZQ formula conforms to the ancient compatibility rule of “Jun-Chen-Zuo-Shi” due to the different, while cooperative roles that herbs possess, specifically, the direct FD curative effects of GHX (serving as Jun drug), the anti-bacterial efficacy and major accompanying symptoms-reliving bioactivities of ZS and BZ (as Chen), the detoxication and ADME regulation capacities of GC (as Shi), as well as the minor symptoms-treating efficacy of the rest 7 herbs (as Zuo). This work not only provides an insight of the therapeutic mechanism of TCMs on treating GI diseases from a multi-scale perspective, but also may offer an efficient way for drug discovery and development from herbal medicine as complementary drugs.