To explore the effect and anxiolytic mechanism of a natural remedy called Fructus gardeniae (FG). The elevated-plus maze (EPM) test was used to confirm the anxiolytic effect of FG. The potential and anxiolytic components, targets, and route processes of FG were investigated using the network pharmacology method in conjunction with metabolomics and molecular docking technologies. FG could greatly enhance the proportion of time and times of opening arms, according to the EPM data. As to the metabolomics findings, a total of 61 distinct metabolites were found, mainly involved in glycine, serine, and threonine metabolism as well as alanine, aspartate, and glutamate metabolism. The primary active ingredients of FG, nicotiflorin, jasminodiol, and crocetin, demonstrated substantial binding affinities with monoamine oxidase A (MAOA), monoamine oxidase A (ACHE), malate dehydrogenase 2 (MDH2), glutamate decarboxylase 2 (GAD2), glutamate decarboxylase 1 (GAD1), and nitric oxide synthase (NOS1), according to the findings of network pharmacology and molecular docking. FG exerts an anxiolytic action via targeting MAOA, ACHE, MDH2, GAD2, GAD1, and NOS1, and regulating the metabolism of glycine, serine, and threonine as well as alanine, aspartic acid, and glutamic acid.