As a central research topic in the field of positive psychology, hope refers to an individual's goal-oriented expectations that include both agency thinking (i.e., the motivation to initiate and sustain actions to achieve goals) and pathway thinking (i.e., the capacity to find ways toward goals). Evidence from many previous studies has shown the role of hope in protecting against anxiety. However, little is known about the neurobiological basis of hope and the underlying mechanism that how hope reduces anxiety in the brain. Here, we employed fractional amplitude of low-frequency fluctuations (fALFF) to investigate these issues in 231 high school students using resting-state functional magnetic resonance imaging (RS-fMRI). The whole-brain correlation analyses revealed that higher trait hope was related to lower fALFF in the bilateral medial orbitofrontal cortex (mOFC), which is involved in reward-related processing, motivation production, problem solving and goal-directed behaviors. Furthermore, mediation analyses suggested that trait hope acted as a mediator in the association between mOFC spontaneous activity and anxiety. These results persisted even after adjusting for the effects of positive and negative affect. Overall, this study provides the first evidence for functional brain substrates underlying trait hope and reveals a potential mechanism that trait hope mediates the protective role of spontaneous brain activity against anxiety.