The goal of this study was to obtain a better understanding of the physiological basis of errors of visual search. Previous research has shown that search errors occur when visual neurons in the frontal eye field (FEF) treat distractors as if they were targets. We replicated this finding during an inefficient form search and extended it by measuring simultaneously a macaque homologue of an event-related potential indexing the allocation of covert attention known as the m-N2pc. Based on recent work, we expected errors of selection in FEF to propagate to areas of extrastriate cortex responsible for allocating attention and implicated in the generation of the m-N2pc. Consistent with this prediction, we discovered that when FEF neurons selected a distractor instead of the search target, the m-N2pc shifted in the same, incorrect direction prior to the erroneous saccade. This suggests that such errors are due to a systematic misorienting of attention from the initial stages of visual processing. Our analyses also revealed distinct neural correlates of false alarms and guesses. These results demonstrate that errant gaze shifts during visual search arise from errant attentional processing.