Post-translational modification by the lipid palmitate is crucial for the correct targeting and function of many proteins. Here we show that huntingtin (htt) is normally palmitoylated at cysteine 214, which is essential for its trafficking and function. The palmitoylation and distribution of htt are regulated by the palmitoyl transferase huntingtin interacting protein 14 (HIP14). Expansion of the polyglutamine tract of htt, which causes Huntington disease, results in reduced interaction between mutant htt and HIP14 and consequently in a marked reduction in palmitoylation. Mutation of the palmitoylation site of htt, making it palmitoylation resistant, accelerates inclusion formation and increases neuronal toxicity. Downregulation of HIP14 in mouse neurons expressing wild-type and mutant htt increases inclusion formation, whereas overexpression of HIP14 substantially reduces inclusions. These results suggest that the expansion of the polyglutamine tract in htt results in decreased palmitoylation, which contributes to the formation of inclusion bodies and enhanced neuronal toxicity.