The segregation of the genome into accessible euchromatin and histone H3K9-methylated heterochromatin helps silence repetitive elements and tissue-specific genes. In Caenorhabditis elegans, MET-2, the homologue of mammalian SETDB1, catalyzes H3K9me1 and me2, yet like SETDB1, its regulation is enigmatic. Contrary to the cytosolic enrichment of overexpressed MET-2, we show that endogenous MET-2 is nuclear throughout development, forming perinuclear foci in a cell cycle-dependent manner. Mass spectrometry identified two cofactors that bind MET-2: LIN-65, a highly unstructured protein, and ARLE-14, a conserved GTPase effector. All three factors colocalize in heterochromatic foci. Ablation of lin-65, but not arle-14, mislocalizes and destabilizes MET-2, resulting in decreased H3K9 dimethylation, dispersion of heterochromatic foci, and derepression of MET-2 targets. Mutation of met-2 or lin-65 also disrupts the perinuclear anchoring of genomic heterochromatin. Loss of LIN-65, like that of MET-2, compromises temperature stress resistance and germline integrity, which are both linked to promiscuous repeat transcription and gene expression.