Conserved cis-regulatory elements (CREs) control Engrailed-, Pax2-, and dachshund-related gene expression networks directing the formation and function of corresponding midbrain circuits in arthropods and vertebrates. Polarized outgroup analyses of 31 sequenced metazoan genomes representing all animal clades reveal the emergence of Pax2- and dachshund-related CRE-like sequences in anthozoan Cnidaria. The full complement, including Engrailed-related CRE-like sequences, is only detectable in spiralians, ecdysozoans, and chordates that have a brain; they exhibit comparable genomic locations and extensive nucleotide identities that reveal the presence of a conserved core domain, all of which are absent in non-neural genes and, together, distinguish them from randomly assembled sequences. Their presence concurs with a genetic boundary separating the rostral from caudal nervous systems, demonstrated for the metameric brains of annelids, arthropods, and chordates and the asegmental cycloneuralian and urochordate brain. These findings suggest that gene regulatory networks for midbrain circuit formation evolved within the lineage that led to the common ancestor of protostomes and deuterostomes.