The axon regeneration ability of neurons depends on the interplay of factors that promote and inhibit regeneration. In Caenorhabditis elegans, axon regeneration is promoted by the JNK MAP kinase (MAPK) pathway. Previously, we found that the endocannabinoid anandamide (AEA) inhibits the axon regeneration response of motor neurons after laser axotomy by suppressing the JNK signaling pathway. Here, we show that the G-protein-coupled receptors (GPCRs) NPR-19 and NPR-32 inhibit axon regeneration in response to AEA. Furthermore, we show that sensory neuron expression of the nape-1 gene, which encodes an enzyme synthesizing AEA, causes the regenerating motor axons to avoid sensory neurons and this avoidant response depends on NPR-19 and NPR-32. These results indicate that the navigation of regenerating axons is modulated by the action of AEA on NPR-19/32 GPCRs.