Neural activity in sensory cortex is modulated by behavioral and cognitive factors, and this modulation is thought to contribute to the selection of specific sensory information needed to achieve behavioral goals. In contrast, more abstract behavioral variables that are independent of stimulus selection, such as stimulus-response mapping, are thought to be encoded by neurons outside of sensory cortex. We show that information about such mapping is robustly encoded in the responses of neurons in primate visual cortex. Monkeys were trained to alternate between two tasks that differed in the rule governing the mapping of a remembered visual cue onto an eye movement response. During the memory-delay period, neurons in area V4 reliably signaled the remembered cue location in both tasks. However, the encoding of cue location depended critically on the stimulus-response mapping rule. Thus, V4 delay activity encoded the mapping rule and signaled the preparation of the appropriate motor response rather than spatial working memory per se, contrary to previous assumptions. In addition, we probed the origins of motor-related delay activity and found that it was reduced during local inactivation of the frontal eye field (FEF). The results demonstrate that behavioral modulation of visual cortical activity is not solely related to the selection of sensory stimuli but instead reflects a distinct mechanism for sensory-guided motor output.