Functional dyspepsia (FD) is one of the more common functional disorders, with a prevalence of 20-25 %. It seriously affects the quality life of patients. Xiaopi Hewei Capsule (XPHC) is a classic formula originated from the Chinese Miao minority. Clinical studies have demonstrated that XPHC can effectively alleviate the symptoms of FD, but the molecular mechanism has not been elucidated. The purpose of this work is to investigate the mechanism of XPHC on FD by integrating metabolomics and network pharmacology. The mice models of FD were established, and gastric emptying rate, small intestine propulsion rate, serum level of motilin and gastrin were evaluate to study the interventional effect of XPHC on FD. Next, a metabolomics strategy has been developed to screen differential metabolites and related metabolic pathways induced by XPHC. Then, prediction of active compounds, targets and pathways of XPHC in treating FD were carried out by commonly used network pharmacological method. Finally, two parts of the results were integrated to investigate therapeutic mechanism of XPHC on FD, which were preliminary validated based on molecular docking. Thus, twenty representative different metabolites and thirteen related pathways of XPHC in treating FD were identified. Most of these metabolites were restored using modulation after XPHC treatment. The results of the network pharmacology analysis showed ten crucial compounds and nine hub genes related to the treatment of FD with XPHC. The further integrated analysis focused on four key targets, such as albumin (ALB), epidermal growth factor receptor (EGFR), tumor necrosis factor (TNF) and roto-oncogene tyrosine-protein kinase Src (SRC), and three representative biomarkers such as citric acid, L-leucine and eicosapentaenoic acid. Furthermore, molecular docking results showed that ten bioactive compounds from XPHC have good binding interactions with the four key genes. The functional enrichment analysis indicated that the potential mechanism of XPHC in treating FD was mainly associated with energy metabolism, amino acid metabolism, lipid metabolism, inflammatory reactions and mucosal repair. Our work confirms that network pharmacology-integrated metabolomics strategyis a powerful means to reveal the therapeutic mechanisms of XPHC improves FD, which contribute its further scientific research.