The efficiency of sensory coding is affected both by past events (adaptation) and by expectation of future events (prediction). Here we employed a novel visual stimulus paradigm to determine whether expectation influences orientation selectivity in the primary visual cortex. We used two-photon calcium imaging (GCaMP6f) in awake mice viewing visual stimuli with different levels of predictability. The stimuli consisted of sequences of grating stimuli that randomly shifted in orientation or systematically rotated with occasionally unexpected rotations. At the single neuron and population level, there was significantly enhanced orientation-selective response to unexpected visual stimuli through a boost in gain, which was prominent in awake mice but also present to a lesser extent under anesthesia. We implemented a computational model to demonstrate how neuronal responses were best characterized when adaptation and expectation parameters were combined. Our results demonstrated that adaptation and prediction have unique signatures on activity of V1 neurons.