In this study, a mouse model of premature ovarian failure(POF) was constructed by injecting D-galactose(200 mg·kg~(-1)) into the back of the neck for 6 weeks. The mice were randomly divided into a normal group(group N), a model group(group M), and a Qiwei Guibao Granules group(group A, 12.87 g·kg~(-1)). Starting from the 11th day of modeling, group A was treated with Qiwei Guibao Granules by gavage for 32 days, while group M and group N were given equal volume of saline. Metabolomics analysis was used to explore the mechanism of action of Qiwei Guibao Granules in the treatment of POF. The results showed that compared with group N, the group M exhibited decreased wet weight of bilateral ovaries, increased levels of LH and FSH in serum, and significantly decreased levels of E_2 and PROG. After treatment with Qiwei Guibao Granules, compared with the group M, the group A showed a significant increase in the wet weight of bilateral ovaries, a significant decrease in the levels of FSH and LH in serum, and a significant increase in the level of E_2. Metabolomics analysis revealed 55 differential metabolites identified between group N and group M(14 upregulated and 41 downregulated compared with group N) and 82 differential metabolites identified between group M and group A(56 upregulated and 26 downregulated compared with group M), with 5 metabolites showing consistent changes between the group N vs group M. After excluding these 5 metabolites, 77 metabolites that changed after intervention with Qiwei Guibao Granules were focused on. These mainly involved histidine metabolism, glycine, serine, and threonine metabolism, and glycerophospholipid metabolism. Among them, carnosine, 1-methyl-L-histidine, imidazoleacetic acid, choline, L-threonine, beta-hydroxypyruvic acid, phosphatidylcholine, and glycerol-3-phosphate were the major differential metabolites in these three metabolic pathways. Therefore, Qiwei Guibao Granules may exert therapeutic effects on POF mice by regulating amino acid metabolism and lipid metabolism in the mouse body.