Obsessive-compulsive disorder (OCD) possesses distinctive characteristics inviting evolutionary and anthropological explanations. A genetically based condition with low fecundity persisting through generations is paradoxical. The concept of group selection is an evolutionary principle capable of clarifying the perplexing epidemiology of OCD. Using a group-selection paradigm, the authors propose that OCD reflects an ancient form of behavioural specialization. The majority of compulsions such as checking, washing, counting, needing to confess, hoarding and requiring precision, all carry the potential to benefit society. Focussing primarily on hunting and gathering cultures, the potential evolutionary advantages of OCD are explored.