Background: The ventral midline is a prominent structure in vertebrate and invertebrate nervous systems that provides crucial topological information for guiding axons to their appropriate target destinations. Rather than being composed of specialized midline glia cells as in many other species, the embryonic midline of the nematode Caenorhabditis elegans is physically defined by motoneuron cell bodies that separate the left from the right ventral cord fascicles. Their function during development, if any, is not known. Results: We show here that besides being components of the postembryonic locomotory circuit, these embryonic motoneurons (eMNs) actively provide midline guidance information for a specific subset of ventral midline axons. This information is provided in the form of a novel, cell-surface-anchored immunoglobulin superfamily (IgSF) member, WRK-1. WRK-1 acts in eMNs to prevent follower axons from inappropriately crossing the ventral midline. We describe the function of the Eph receptor vab-1 and multiple ephrin ligands at the midline, and we show by double mutant analysis and physical interaction tests that WRK-1 functionally interacts with the Eph receptor system. This interaction appears to occur exclusively in the context of axon guidance at the ventral midline but not in other cellular contexts, thereby suggesting that Eph receptor signaling is mechanistically distinct in different tissue types. Conclusions: Our studies reveal cellular and molecular components of axon midline patterning and suggest that Ephrin signaling relies on previously unknown accessory components.