A new hypothesis is presented within the framework of evolutionary psychology that attempts to explain the origins of obsessive-compulsive disorder. It is suggested that obsessions and compulsions originate from the overactivity of a mental module that the majority of humans possess and has the function of generating risk scenarios without voluntary intervention. It is hypothesised that obsessional phenomena function as an off-line risk avoidance process, designed to lead to risk avoidance behaviour at a future time, thus distinguishing it from anxiety and related phenomena as on-line emotional states, designed to lead to the avoidance of immediate and direct risks. Finally, the hypothesis makes a number of specific predictions that are testable and refutable. It is contended that the present hypothesis if supported by empirical evidence could serve as a basis for future research on this important disorder.