BACKGROUND: Depression is a common mental disorder that significantly impacts global well-being. Although stress is a major contributor to depression, not all stress leads to depressive outcomes due to differences in stress perception. Understanding the neural mechanisms of stress perception may help identify biomarkers for targeted interventions to alleviate stress-related depression. METHODS: This study included 113 participants. Each participant completed a Verbal Fluency Task (VFT) while undergoing functional near-infrared spectroscopy (fNIRS) to monitor brain activity. Oxyhemoglobin (Oxy-Hb) concentration data were analyzed using Matlab, and PROCESS v4.1 to examine neural mechanisms connecting stress perception and depression. RESULTS: Correlation analysis showed a significant negative association between depression severity and Oxy-Hb concentration in several brain regions, including the bilateral dorsolateral prefrontal cortex (DLPFC), bilateral Broca's area (BA), right frontal pole (FP), and right orbitofrontal cortex (OFC). Mediation and moderation analyses revealed that the bilateral DLPFC serves as a key mediator in the relationship between stress perception and depression, with the supplementary motor area (SMA) acts as a moderator. Functional differentiation was observed, with the left DLPFC and left SMA influencing the effect of nervous on depression, and the right DLPFC and right SMA influencing the effect of uncontrolled on depression. CONCLUSION: The bilateral DLPFC and SMA play critical roles in mediating and moderating stress perception's impact on depression, suggesting these regions as potential targets for interventions in stress-related depressive disorders.