We found that the inactivation of Braf in the juvenile or adult brain differentially affects their depression-like behavior or anxiety as adults. Here, BRAF is linked to major depressive disorder.