Familiarity with stimuli that bring neither reward nor punishment, manifested through behavioral habituation, enables organisms to detect novelty and devote cognition to important elements of the environment. Here we describe in mice a form of long-term behavioral habituation to visual grating stimuli that is selective for stimulus orientation. Orientation-selective habituation (OSH) can be observed both in exploratory behavior in an open arena and in a stereotyped motor response to visual stimuli in head-restrained mice. We found that the latter behavioral response, termed a 'vidget', requires V1. Parallel electrophysiological recordings in V1 revealed that plasticity, in the form of stimulus-selective response potentiation (SRP), occurred in layer 4 of V1 as OSH developed. Local manipulations of V1 that prevented and reversed electrophysiological modifications likewise prevented and reversed memory demonstrated behaviorally. These findings suggest that a form of long-term visual recognition memory is stored via synaptic plasticity in primary sensory cortex.