Anxiety disorders are the most common psychiatric illnesses. Present drugs can provide temporary relief for anxiety, however, they also come with side effects and safety concerns such as dependence, suicide, overdose and so on. Therefore, it is critical to discover new anxiolytic targets. An ongoing area of interest in the field of psychiatric diseases is the orexin system. Emerging body of evidences show that orexin receptor 1 (OX1R) has promising potential as novel anxiolytic target. However, little attention has been paid to orexin receptor 2 (OX2R) in anxiety. In this study, by using behavioral test, stereotaxic surgery and microinjection, virus-mediated knockdown of OX2R and pharmacological method, we found that: (1) Intraperitoneal injection of OX2R antagonist Seltorexant induced increased baseline anxiety-like behaviors in male mice. (2) Intraperitoneal injection of OX2R agonist YNT-185 reduced baseline anxiety-like behaviors in male mice. (3) Intraperitoneal injection of YNT-185 alleviated morphine withdrawal-induced anxiety-like behaviors in male mice. (4) Microinjection of YNT-185 into the VTA played anxiolytic effect in male mice. (5) Virus-mediated OX2R knockdown in the VTA induced anxiety-like behaviors in male mice.