The event-related brain potentials (ERPs) elicited by nociceptive stimuli are largely influenced by vigilance, emotion, alertness, and attention. Studies that specifically investigated the effects of cognition on nociceptive ERPs support the idea that most of these ERP components can be regarded as the neurophysiological indexes of the processes underlying detection and orientation of attention toward the eliciting stimulus. Such detection is determined both by the salience of the stimulus that makes it pop out from the environmental context (bottom-up capture of attention) and by its relevance according to the subject's goals and motivation (top-down attentional control). The fact that nociceptive ERPs are largely influenced by information from other sensory modalities such as vision and proprioception, as well as from motor preparation, suggests that these ERPs reflect a cortical system involved in the detection of potentially meaningful stimuli for the body, with the purpose to respond adequately to potential threats. In such a theoretical framework, pain is seen as an epiphenomenon of warning processes, encoded in multimodal and multiframe representations of the body, well suited to guide defensive actions. The findings here reviewed highlight that the ERPs elicited by selective activation of nociceptors may reflect an attentional gain apt to bridge a coherent perception of salient sensory events with action selection processes.