Sensorimotor transformation, a process that converts sensory stimuli into motor actions, is critical for the brain to initiate behaviors. Although the circuitry involved in sensorimotor transformation has been well delineated, the molecular logic behind this process remains poorly understood. Here, we performed high-throughput and circuit-specific single-cell transcriptomic analyses of neurons in the superior colliculus (SC), a midbrain structure implicated in early sensorimotor transformation. We found that SC neurons in distinct laminae express discrete marker genes. Of particular interest, Cbln2 and Pitx2 are key markers that define glutamatergic projection neurons in the optic nerve (Op) and intermediate gray (InG) layers, respectively. The Cbln2+ neurons responded to visual stimuli mimicking cruising predators, while the Pitx2+ neurons encoded prey-derived vibrissal tactile cues. By forming distinct input and output connections with other brain areas, these neuronal subtypes independently mediate behaviors of predator avoidance and prey capture. Our results reveal that, in the midbrain, sensorimotor transformation for different behaviors may be performed by separate circuit modules that are molecularly defined by distinct transcriptomic codes.