The invention provides a method for measuring content of eighteen ingredients of Huangqi Jianzhong Wan (astragalus mongholicus pill for invigorating the stomach and regulating the middle warmer). Themethod includes the steps of subjecting the Huangqi Jianzhong Wan to ultrasonic extraction and centrifugation, extracting the liquid supernate, detecting the liquid supernate by an ultra performance liquid chromatography-tandem mass spectrometry positive and negative ion mode, preparing a mixed standard product solution from standard products of the eighteen ingredients, building a standard curve,and carrying out the methodological study. The method can realize measuring the eighteen ingredients of the Huangqi Jianzhong Wan, namely ononin, formononetin, calycosin, calycosin-7-glucoside, pterocarpan, astraisoflavan-7-O-beta-D-glucoside, isoflavane, isoliquiritin, liquiritigenin, liquiritin, glycyrrhetinic acid, cinnamic acid, isomucronulatol 7-O-beta-glucoside, astragaloside I, astragaloside II, astragaloside III, astragaloside IV and gallic acid. In the method, the sample pre-treatment process is simple and accordingly time for measurement is short; the method has the advantages of high specificity, high flexibility, good reproducibility and short analysis time, and can be applied to monitoring of production quality of the Huangqi Jianzhong Wan.