The spinal nerves in amphioxus are compared with the spinal and cranial nerves in lampreys. The dorsal spinal roots in amphioxus are similar to the mixed sensory and motor dorsal roots of many cranial nerves in lampreys but not to the purely sensory dorsal spinal roots in lampreys and gnathostomes. Likewise, cranial nerves V, VII, IX and X in lampreys, and all spinal nerves in amphioxus, lack a separate ventral motor root which is a constant feature of all spinal motor roots in lampreys and other vertebrates. Based on these similarities and differences, it is proposed that cranial and spinal nerves in craniates are independently derived serial homologs of elements of an amphioxus-like ancestral pattern. Further evolution involved the addition of neural crest-derived ganglia to most cranial and all spinal nerves, and the addition of placodally derived ganglia to many cranial nerves. The possible homology of ocular motor nerves is discussed but cannot be resolved owing to the absence of these nerves in hagfishes, which are the only relevant outgroup.