Depression is one of the most common mental disorders. The inactivation of tryptophan hydroxylase and the resulting serotonin decrease are the key factors in depression pathology. Herein, we report for the first time that Fe3O4 nanoparticles exhibit tryptophan hydroxylase-like activity and successfully verify their ability to restore serotonin synthesis in the brain for the treatment of depression. To achieve better biocompatibility and brain delivery, the Fe3O4 nanoparticles were functionalized with chitosan (CS) (Fe3O4@CS), enabling their delivery from the nose to the brain. Fe3O4@CS catalyzes the transformation of tryptophan into 5-hydroxytryptophan with the participation of high levels of endogenous ascorbic acid and hydrogen peroxide in stressed neurons, thus compensating for the deactivated tryptophan hydroxylase in the brain. In vivo Fe3O4@CS treatment results in the recovery of 5-hydroxytryptophan and serotonin levels and improvement of neuronal signal transduction ability in a depression mouse model, thus ameliorating depressive-like behaviors. The presented strategy of restoring serotonin synthesis in situ based on a tryptophan hydroxylase-like nanozyme provides a more accurate and efficient approach for the treatment of depression.