Xiao Jianzhong Granules (XJZG), a well-known traditional prescription with protective effects on the gastric mucosa, as documented in the Treatise on Typhoid and Miscellaneous Diseases. Clinical studies have proven that XJZG exhibits significant anti-colitis properties and effectively alleviates duodenal ulcers. However, despite its clinical popularity, comprehensive studies on its chemical composition and in vivo metabolism remain limited. In the present study, gas chromatography coupled with mass spectrometry (GC-MS) and ultra-high-performance liquid chromatography coupled with Q-Exactive Orbitrap mass spectrometry (UHPLC Q-Exactive Orbitrap MS) were used to analyze the chemical composition of XJZG, while it is in vivo metabolic profile was further assessed with UHPLC Q-Exactive Orbitrap MS. Additionally, ultra-high-performance liquid chromatography coupled with triple quadrupole mass spectrometry (UHPLC-MS/MS) was utilized to quantify its primary components. As a result, a total of 51 volatiles were characterized by GC-MS, and 139 compounds were characterized by UHPLC Q-Exactive Orbitrap MS in vitro. In addition, 51 prototype components and 133 metabolites were characterized in vivo. Notably, 5 new compounds were discovered in this process. The main metabolic reactions included oxidation, reduction, hydrolysis, glucuronidation, and sulfate esterification. In quantitative analysis, 17 components were determined and successfully applied for detection by UPLC-MS/MS in multiple reaction monitoring mode. The quantitative methods were validated and met the requirements. Through multivariate statistical analysis, 6 components were selected as potential quality markers for XJZG based on PCA and OPLS-DA. Additionally, our study provides supplementary chemical evidence to further elucidate the material basis of XJZG.