In humans, learning to produce correct visually guided movements to adapt to new sensorimotor conditions requires the formation of an internal model that represents the new transformation between visual input and the required motor command. When the new environment requires adaptation to directional errors, learning generalizes poorly to untrained locations and directions, indicating that such learning is local. Here we replicated these behavioral findings in rhesus monkeys using a visuomotor rotation task and simultaneously recorded neuronal activity. Specific changes in activity were observed only in a subpopulation of cells in the motor cortex with directional properties corresponding to the locally learned rotation. These changes adhered to the dynamics of behavior during learning and persisted between learning and relearning of the same rotation. These findings suggest a neural mechanism for the locality of newly acquired sensorimotor tasks and provide electrophysiological evidence for their retention in working memory.