Post-translational histone modifications regulate chromatin compaction and gene expression to control many aspects of development. Mutations in genes encoding regulators of H3K4 methylation are causally associated with neurodevelopmental disorders characterized by intellectual disability and deficits in motor functions. However, it remains unclear how H3K4 methylation influences nervous system development and contributes to the aetiology of disease. Here, we show that the catalytic activity of <i>
set-2</i>, the <i>C. elegans</i> homolog of the H3K4 methyltransferase KMT2F/G (SETD1A/B) genes, controls embryonic transcription of neuronal genes and is required for establishing proper axon guidance and for neuronal functions related to locomotion and learning. Moreover, we uncover a striking correlation between components of the H3K4 regulatory machinery mutated in neurodevelopmental disorders and the process of axon guidance in <i>C. elegans</i> Thus, our study supports an epigenetic-based model for the aetiology of neurodevelopmental disorders, based on aberrant axon guidance process originating from deregulated H3K4 methylation.