Abstract AnkG, encoded by the ANK3 gene, is a multifunctional scaffold protein with complex isoform expression: the 480 kDa and 270 kDa isoforms have roles at the axon initial segment and node of Ranvier, whereas the 190 kDa isoform (AnkG-190) has an emerging role in the dendritic shaft and spine heads. All isoforms of AnkG undergo palmitoylation, a post-translational modification regulating protein attachment to lipid membranes. However, palmitoylation of AnkG-190 has not been investigated in dendritic spines. The ANK3 gene and altered expression of AnkG proteins are associated with a variety of neuropsychiatric and neurodevelopmental disorders including bipolar disorders and are implicated in the lithium response, a commonly used mood stabilizer for bipolar disorder patients, although the precise mechanisms involved are unknown. Here, we showed that Cys70 palmitoylation stabilizes the localization of AnkG-190 in spine heads and at dendritic plasma membrane nanodomains. Mutation of Cys70 impairs AnkG-190 function in dendritic spines and alters PSD-95 scaffolding. Interestingly, we find that lithium reduces AnkG-190 palmitoylation thereby increasing its mobility in dendritic spines. Finally, we demonstrate that the palmitoyl acyl transferase ZDHHC8, but not ZDHHC5, increases AnkG-190 stability in spine heads and is inhibited by lithium. Together, our data reveal that palmitoylation is critical for AnkG-190 localization and function and a potential ZDDHC8/AnkG-190 mechanism linking AnkG-190 mobility to the neuronal effects of lithium.