Repetitive unpleasant thoughts and ritualized behaviors are the key features of obsessive-compulsive disorder (OCD). The classical neuroethological models of OCD rely largely on behavioral similarities between animal stereotypies and human compulsive rituals and are unable to account for the cognitive component of OCD. The cognitive symptoms of OCD need to be addressed in an evolutionary psychological context that incorporates information about human brain evolution. OCD can be understood as an extreme on a continuum of evolved harm-avoidance strategies. A pathological exaggeration of our evolved capacity to cognitively represent future scenarios, including imagined consequences of our own thoughts and actions (metarepresentation), may be part of the set of evolved psychological mechanisms contributing to the psychopathology of OCD. The costly side of the adaptive ability to anticipate future needs or threats could be that etiologically heterogeneous affections of the underlying striatal-frontal brain circuits may render an individual vulnerable to develop OCD.