This study used m-chloropheniperazine(MCPP) and chronic unforeseeable mild stress(CUMS) to induce the rat models of anxiety and depression, respectively. The behaviors of rats were observed by the open field test(OFT), light-dark exploration test(LDE), tail suspension test(TST), and forced swimming test(FST), and the antidepressant and anxiolytic effects of agarwood essential oil(AEO), agarwood fragrant powder(AFP), and agarwood line incense(ALI) were explored. The enzyme-linked immunosorbent assay(ELISA) was used to determine the levels of 5-hydroxytryptamine(5-HT), glutamic acid(Glu), and γ-aminobutyric acid(GABA_A) in the hippocampal area. The Western blot assay was used to determine the protein expression levels of glutamate receptor 1(GluR1) and vesicular glutamate transporter type 1(VGluT1), exploring the anxiolytic and antidepressant mechanism of agarwood inhalation. The results showed that compared with the anxiety model group, the AEO, AFP, and ALI groups decreased the total distance(P<0.05), decreased the velocity of movements(P<0.05), prolonged the immobile time(P<0.05), and reduced the distance and velocity of the rat model of anxiety in the dark box(P<0.05). Compared with the depression model group, the AEO, AFP, and ALI groups increased the total distance and average velocity(P<0.05), reduced the immobile time(P<0.05), and reduced the forced swimming and tail suspension time(P<0.05). In terms of transmitter regulation, the AEO, AFP, and ALI groups decreased the level of Glu in the rat model of anxiety(P<0.05) and increased the levels of GABA_A and 5-HT(P<0.05), while the AEO, AFP, and ALI groups all increased the level of 5-HT in the rat model of depression(P<0.05) and decreased the levels of GABA_A and Glu(P<0.05). At the same time, the AEO, AFP, and ALI groups all increased the protein expression levels of GluR1 and VGluT1 in the hippocampus of the rat models of anxiety and depression(P<0.05). In conclusion, AEO, AFP, and ALI exert anxiolytic and antidepressant effects, and the mechanism might be related to the regulation of the neurotransmitter and the protein expression of GluR1 and VGluT1 in the hippocampus.