Layer-specific innervation is a major form of synaptic targeting in the central nervous system. In the Drosophila visual system, photoreceptors R7 and R8 connect to targets in distinct layers of the medulla, a ganglion of the optic lobe. We show here that Capricious (CAPS), a transmembrane protein with leucine-rich repeats (LRRs), is a layer-specific cell adhesion molecule that regulates photoreceptor targeting in the medulla. During the period of photoreceptor targeting, caps is specifically expressed in R8 and its target layer but not in R7 or its recipient layer. caps loss-of-function mutations cause local targeting errors by R8 axons, including layer change. Conversely, ectopic expression of caps in R7 redirects R7 axons to terminate in the CAPS-positive R8 recipient layer. CAPS promotes homophilic cell adhesion in transfected S2 cells. These results suggest that CAPS regulates layer-specific targeting by mediating specific axon-target interaction.