We propose a top-down approach to the symptoms of obsessive–compulsive disorder (OCD) based on a statistical dynamical framework. An increased depth in the basins of attraction of attractor network states in the brain makes each state too stable, so that it tends to remain locked in that state and can not easily be moved on to another state. We suggest that the different symptoms that may be present in OCD could be related to changes of this type in different brain regions. For example, the difficulty in attentional and cognitive set switching could be related to networks operating in this way in the prefrontal cortex. Repetitive actions and a difficulty in moving to new actions could be related to overstability in networks in the higher order motor, including cingulate areas. In integrate-and-fire network simulations, an increase in the N-methyl-d-aspartate (NMDA) and/or α-amino-3-hydroxy-5-methyl-4-isoxazolepropionic acid (AMPA) receptor conductances, which increases the depth of the attractor basins, increases the stability of attractor networks, and makes them less easily moved on to another state by a new stimulus. Increasing γ-aminobutyric acid (GABA)-receptor activated currents can partly reverse this overstability. There is now some evidence for overactivity in glutamate transmitter systems in OCD, and the hypothesis presented here shows how some of the symptoms of OCD could be produced by the increase in the stability of attractor networks that is produced by increased glutamatergic activity.