When events occur at predictable instants, anticipation improves performance. Knowledge of event timing modulates motor circuits and thereby improves response speed. By contrast, the neuronal mechanisms that underlie changes in sensory perception resulting from expectation are not well understood. We developed a behavioral procedure for rats in which we manipulated expectations about sound timing. Valid expectations improved both the speed and the accuracy of the subjects' performance, indicating not only improved motor preparedness but also enhanced perception. Single-neuron recordings in primary auditory cortex showed enhanced representation of sounds during periods of heightened expectation. Furthermore, we found that activity in auditory cortex was causally linked to the performance of the task and that changes in the neuronal representation of sounds predicted performance on a trial-by-trial basis. Our results indicate that changes in neuronal representation as early as primary sensory cortex mediate the perceptual advantage conferred by temporal expectation.