The error-related negativity (ERN) is a response-locked component in the event-related potential observed as a negative deflection 50–100 ms following the commission of an error. An unpredictable context has been shown to potentiate amygdala activity, attentional bias toward threat, and the ERN in adults. However, it is unclear whether the impact of unpredictability on the ERN is also observed in children and adolescents. In a sample of 32 9–17 year-old participants, we examined the influence of a task-irrelevant unpredictable context on neural response to errors. Participants completed a flanker task designed to elicit the ERN, while simultaneously being exposed to task-irrelevant tone sequences with either predictable or unpredictable timing. Unpredictable tones were rated as more anxiety provoking compared to the predictable tones. Fewer errors were made during unpredictable relative to predictable tones. Moreover, the ERN—but not the correct response negativity (CRN) or stimulus-locked N200—was potentiated during the unpredictable relative to predictable tones. The current study replicates and extends previous findings by demonstrating that an unpredictable context can increase task performance and selectively potentiate the ERN in children and adolescents. ERN magnitude can be modulated by environmental factors suggesting enhanced error processing in unpredictable contexts.