When we move forward, the visual image on our retina expands. Humans rely on the focus, or center, of this expansion to estimate their direction of heading and, as long as the eyes are still, the retinal focus corresponds to the heading. However, smooth rotation of the eyes adds nearly uniform visual motion to the expanding retinal image and causes a displacement of the retinal focus. In spite of this, humans accurately judge their heading during pursuit eye movements and during active, smooth head rotations even though the retinal focus no longer corresponds to the heading. Recent studies in macaque suggest that correction for pursuit may occur in the dorsal aspect of the medial superior temporal area (MSTd) because these neurons are tuned to the retinal position of the focus and they modify their tuning during pursuit to compensate partially for the focus shift. However, the question remains whether these neurons also shift focus tuning to compensate for smooth head rotations that commonly occur during gaze tracking. To investigate this question, we recorded from 80 MSTd neurons while monkeys tracked a visual target either by pursuing with their eyes or by vestibulo-ocular reflex cancellation (VORC; whole-body rotation with eyes fixed in head and head fixed on body). VORC is a passive, smooth head rotation condition that selectively activates the vestibular canals. We found that neurons shift their focus tuning in a similar way whether focus displacement is caused by pursuit or by VORC. Across the population, compensation averaged 88 and 77% during pursuit and VORC, respectively (tuning shift divided by the retinal focus to true heading difference). Moreover the degree of compensation during pursuit and VORC was correlated in individual cells (P < 0.001). Finally neurons that did not compensate appreciably tended to be gain-modulated during pursuit and VORC and may constitute an intermediate stage in the compensation process. These results indicate that many MSTd cells compensate for general gaze rotation, whether produced by eye-in-head or head-in-world rotation, and further implicate MSTd as a critical stage in the computation of heading. Interestingly vestibular cues present during VORC allow many cells to compensate even though humans do not accurately judge their heading in this condition. This suggests that MSTd may use vestibular information to create a compensated heading representation within at least a subpopulation of cells, which is accessed perceptually only when additional cues related to active head rotations are also present.