To validate our findings, we combined bulk RNA-Seq and WGCNA analysis to reveal key genes associated with depression and verified the relationship between YAP1 and depression using clinical samples.<h4>Results</h4>Our study found significant changes in the proportion and transcriptional profiles of microglia in depressed prefrontal cortex tissues. This evidence concerns the gene YAP1 and major depressive disorder.