In mammalian cells, DNA methylation on the fifth position of cytosine (5mC) plays an important role as an epigenetic mark. However, DNA methylation was considered to be absent in C. elegans because of the lack of detectable 5mC, as well as homologs of the cytosine DNA methyltransferases. Here, using multiple approaches, we demonstrate the presence of adenine N(6)-methylation (6mA) in C. elegans DNA. We further demonstrate that this modification increases trans-generationally in a paradigm of epigenetic inheritance. Importantly, we identify a DNA demethylase, NMAD-1, and a potential DNA methyltransferase, DAMT-1, which regulate 6mA levels and crosstalk between methylations of histone H3K4 and adenines and control the epigenetic inheritance of phenotypes associated with the loss of the H3K4me2 demethylase spr-5. Together, these data identify a DNA modification in C. elegans and raise the exciting possibility that 6mA may be a carrier of heritable epigenetic information in eukaryotes.