The molecular mechanisms underlying the ability of axons to regenerate after injury remain poorly understood. Here we show that in Caenorhabditis elegans, axotomy induces ectopic expression of serotonin (5-HT) in axotomized non-serotonergic neurons via HIF-1, a hypoxia-inducible transcription factor, and that 5-HT subsequently promotes axon regeneration by autocrine signalling through the SER-7 5-HT receptor. Furthermore, we identify the rhgf-1 and rga-5 genes, encoding homologues of RhoGEF and RhoGAP, respectively, as regulators of axon regeneration. We demonstrate that one pathway initiated by SER-7 acts upstream of the C. elegans RhoA homolog RHO-1 in neuron regeneration, which functions via G12α and RHGF-1. In this pathway, RHO-1 inhibits diacylglycerol kinase, resulting in an increase in diacylglycerol. SER-7 also promotes axon regeneration by activating the cyclic AMP (cAMP) signalling pathway. Thus, HIF-1-mediated activation of 5-HT signalling promotes axon regeneration by activating both the RhoA and cAMP pathways.