The serotonergic system and in particular serotonin 1A receptor (5-HT1AR) are implicated in major depressive disorder (MDD). Here we demonstrated that 5-HT1AR is palmitoylated in human and rodent brains, and identified ZDHHC21 as a major palmitoyl acyltransferase, whose depletion reduced palmitoylation and consequently signaling functions of 5-HT1AR. Two rodent models for depression-like behavior show reduced brain ZDHHC21 expression and attenuated 5-HT1AR palmitoylation. Moreover, selective knock-down of ZDHHC21 in the murine forebrain induced depression-like behavior. We also identified the microRNA miR-30e as a negative regulator of Zdhhc21 expression. Through analysis of the post-mortem brain samples in individuals with MDD that died by suicide we find that miR-30e expression is increased, while ZDHHC21 expression, as well as palmitoylation of 5-HT1AR, are reduced within the prefrontal cortex. Our study suggests that downregulation of 5-HT1AR palmitoylation is a mechanism involved in depression, making the restoration of 5-HT1AR palmitoylation a promising clinical strategy for the treatment of MDD.