Dachengqi Decoction (DCQD) is a well-known prescription of catharsis in “Shang Han Lun”, composed of 4 traditional Chinese medical ingredients: Radix et Rhizoma Rhei (Dahuang), Cortex Magnoliae officinalis (Houpo), Fructus Aurantii Immaturus (Zhishi) and Natrii Sulfas (Mangxiao). Due to the complexity of its composition and inconsistencies in the traditional decocting process, maintaining the quality and exploring the material basis for efficacy of DCQD are challenging. In this study, we established an integrating ultra-high-performance liquid chromatography equipped with quadrupole time-of-flight mass spectrometry (UPLC-Q-TOF-MS) and ultra-fast-performance liquid chromatography equipped with triple quadrupole mass spectrometry (UFLC-QQQ-MS) method to perform qualitative and quantitative analyses of different DCQD formulations. The methods of quality control and content detection of the main components of different formulations were improved by optimizing the parameters of mobile phase composition, gradient and velocity. By optimizing of the method, the separation ability of structurally similar substances such as aloe-emodin, emodin and Apigenin is greatly improved. As a result, in the qualitative analysis, 190 components were detected of which 27 compounds were unambiguously identified by comparison with reference compounds by chromatographic behavior and mass spectrum, and the remaining compounds were tentatively assigned by comparison with fragmentation pathways and characteristic fragment ions in published literature or known databases. In the quantitative analysis, the contents of 19 key ingredients across 10 formulations were determined. The results showed that some components were roughly distributed according to the proportion of Chinese herbs, such as rhein, gallic acid, physcion, hesperetin and limonin. However, the distribution of most components differed greatly from that of Chinese herbs, such as emodin, hesperidin, synephrine and honokiol, producing solubilization effect or inhibition of dissolution effect, which could explainned the varied effects of different formulations in treating conditions like intestinal obstruction and pancreatitis. This study provides a simple, fast and accurate method to identify and quantify the main components in DCQD, and makes preparations for exploring the mechanism of different formulations of DCQD to produce different efficacy in gastrointestinal disease.