Histone modifications deposited by the Polycomb repressive complex 2 (PRC2) play a critical role in the control of growth, development, and adaptation to environmental fluctuations of most multicellular eukaryotes. The catalytic activity of PRC2 is counteracted by Jumonji-type (JMJ) histone demethylases, which shapes the genomic distribution of H3K27me3. Here, we show that two JMJ histone demethylases in Arabidopsis, EARLY FLOWERING 6 (ELF6) and RELATIVE OF EARLY FLOWERING 6 (REF6), play distinct roles in H3K27me3 and H3K27me1 homeostasis. We show that failure to reset these chromatin marks during sexual reproduction results in the transgenerational inheritance of histone marks, which cause a loss of DNA methylation at heterochromatic loci and transposon activation. Thus, Jumonji-type histone demethylases play a dual role in plants by helping to maintain transcriptional states through development and safeguard genome integrity during sexual reproduction.