The transcription factor Keap1-Nrf2 system plays a key role in inflammation which is involved in depression. We found lower expression of Keap1 and Nrf2 proteins in the prefrontal cortex (PFC), CA3 and dentate gyrus (DG) of hippocampus in mice with depression-like phenotype compared to control mice. Serum levels of pro-inflammatory cytokines in Nrf2 knock-out (KO) mice were higher than those of wild-type mice, suggestive of enhanced inflammation in KO mice. Decreased brain-derived neurotrophic factor (BDNF) and its receptor tropomyosin-receptor-kinase B (TrkB) signaling in the PFC, CA3 and DG plays a role in the depression-like phenotype of Nrf2 KO mice. TrkB agonist 7,8-dihydroxyflavone, but not antagonist ANA-12, produced antidepressant effects in Nrf2 KO mice, by stimulating TrkB in the PFC, CA3 and DG. Pretreatment with Nrf2 activator sulforaphane (SFN) prevented the depression-like phenotype induced after repeated social defeat stress. Interestingly, dietary intake of 0.1% glucoraphanin (a precursor of SFN) containing food during juvenile and adolescent stages also prevented the depression-like phenotype evoked in adulthood, after repeated social defeat stress. These findings suggest that Keap1-Nrf2 system plays a key role in depression and that dietary intake of SFN-rich food during juvenile stages and adolescence can confer stress resilience in adulthood.