The simplest animal eyes are eyespots composed of two cells only: a photoreceptor and a shading pigment cell. They resemble Darwin's 'proto-eyes', considered to be the first eyes to appear in animal evolution. Eyespots cannot form images but enable the animal to sense the direction of light. They are characteristic for the zooplankton larvae of marine invertebrates and are thought to mediate larval swimming towards the light. Phototaxis of invertebrate larvae contributes to the vertical migration of marine plankton, which is thought to represent the biggest biomass transport on Earth. Yet, despite its ecological and evolutionary importance, the mechanism by which eyespots regulate phototaxis is poorly understood. Here we show how simple eyespots in marine zooplankton mediate phototactic swimming, using the marine annelid Platynereis dumerilii as a model. We find that the selective illumination of one eyespot changes the beating of adjacent cilia by direct cholinergic innervation resulting in locally reduced water flow. Computer simulations of larval swimming show that these local effects are sufficient to direct the helical swimming trajectories towards the light. The computer model also shows that axial rotation of the larval body is essential for phototaxis and that helical swimming increases the precision of navigation. These results provide, to our knowledge, the first mechanistic understanding of phototaxis in a marine zooplankton larva and show how simple eyespots regulate it. We propose that the underlying direct coupling of light sensing and ciliary locomotor control was a principal feature of the proto-eye and an important landmark in the evolution of animal eyes.