Successful avoidance of a threatening event may negatively reinforce the behavior due to activation of brain structures involved in reward processing. Here, we further investigated the learning-related properties of avoidance using feedback-related negativity (FRN). The FRN is modulated by violations of an intended outcome (prediction error, PE), that is, the bigger the difference between intended and actual outcome, the larger the FRN amplitude is. Twenty-eight participants underwent an operant conditioning paradigm, in which a behavior (button press) allowed them to avoid a painful electric shock. During two learning blocks, participants could avoid an electric shock in 80% of the trials by pressing one button (avoidance button), or by not pressing another button (punishment button). After learning, participants underwent two test blocks, which were identical to the learning ones except that no shocks were delivered. Participants pressed the avoidance button more often than the punishment button. Importantly, response frequency increased throughout the learning blocks but it did not decrease during the test blocks, indicating impaired extinction and/or habit formation. In line with a PE account, FRN amplitude to negative feedback after correct responses (i.e., unexpected punishment) was significantly larger than to positive feedback (i.e., expected omission of punishment), and it increased throughout the blocks. Highly anxious individuals showed equal FRN amplitudes to negative and positive feedback, suggesting impaired discrimination. These results confirm the role of negative reinforcement in motivating behavior and learning, and reveal important differences between high and low anxious individuals in the processing of prediction errors.