The ability to disengage from hopeless situations is critical to goal attainment and effective self-regulation. Two experiments investigated the effects of striving to attain success (approach goals) versus striving to avoid failure (avoidance goals) on persistence. Participants completed anagrams designed so that less persistence during an initial set of unsolvable anagrams was beneficial. In Study 1, participants reported how motivated they were by approach and avoidance goals. In Study 2, participants were primed to set approach or avoidance goals. Participants with avoidance goals persisted longer during failure, with more intense and enduring emotional distress, than those with approach goals. Greater anger predicted spending more time on subsequent unsolvable anagrams and accounted for differences in persistence. The results suggest that people with approach goals are better able to identify when they should disengage during failure, and disengage more completely, than people with avoidance goals.