Previous genome-wide association studies of depression have primarily focused on common variants, limiting our comprehensive understanding of the genetic architecture. In contrast, whole-exome sequencing can capture rare coding variants, helping to explore the phenotypic consequences of altering protein-coding genes. Here, we conducted a large-scale exome-wide association study on 296,199 participants from the UK Biobank, assessing their depressive symptom scores through the Patient Health Questionnaire-4. We identified 22 genes associated with depressive symptoms, including 6 newly discovered genes (TRIM27, UBD, SVOP, ADGRB2, IRF2BPL, and ANKRD12). Both ontology enrichment analysis and plasma proteomics association analysis consistently revealed that the identified genes were associated with immune responses. Furthermore, we identified associations between these genes and brain regions related to depression, such as anterior cingulate cortex and orbitofrontal cortex. Additionally, phenome-wide association analysis demonstrated that TRIM27 and UBD were associated with neuropsychiatric, cognitive, biochemistry, and inflammatory traits. Our findings offer new insights into the potential mechanisms and genetic architecture of depressive symptoms.