Inducible knockout of Dhhc5 in adult mice prevents diet-induced obesity. Here, ZDHHC5 is linked to obesity due to melanocortin 4 receptor deficiency.