Pluripotent stem cells are invaluable resources to study development and disease, holding a great promise for regenerative medicine. Here we use human embryonic stem cells (hESCs) and induced pluripotent stem cells (iPSCs) from patients with Huntington's disease (HD-iPSCs) to shed light into the normal function of huntingtin (HTT) and its demise in disease. We find that HTT binds ATF7IP, a regulator of the histone H3 methyltransferase SETDB1. HTT inhibits the interaction of the ATF7IP-SETDB1 complex with other heterochromatin regulators and transcriptional repressors, maintaining low levels of H3K9 trimethylation (H3K9me3) in hESCs. Loss of HTT promotes global increased H3K9me3 levels and enrichment of H3K9me3 marks at distinct genes, including transcriptional regulators of neuronal differentiation. Although these genes are normally expressed at low amounts in hESCs, HTT knockdown (KD) reduces their induction during neural differentiation. Notably, mutant expanded polyglutamine repeats in HTT diminish its interaction with ATF7IP-SETDB1 complex and trigger H3K9me3 in HD-iPSCs. Conversely, KD of ATF7IP in HD-iPSCs reduces H3K9me3 alterations and ameliorates gene expression changes in their neural counterparts. Taken together, our results indicate ATF7IP as a potential target to correct aberrant H3K9me3 levels induced by mutant HTT.