Understanding how nerves regenerate is an important step towards developing treatments for human neurological disease, but investigation has so far been limited to complex organisms (mouse and zebrafish) in the absence of precision techniques for severing axons (axotomy). Here we use femtosecond laser surgery for axotomy in the roundworm Caenorhabditis elegans and show that these axons functionally regenerate after the operation. Application of this precise surgical technique should enable nerve regeneration to be studied in vivo in its most evolutionarily simple form.