Mood and anxiety
OCD from a Psychoanalytic Perspective
Obsessions, compulsions and insight in OCD, and how Freud, Klein and later analysts understand its defences and meaning.

In modern psychiatric practice, obsessive-compulsive disorder (OCD), traditionally grouped with the anxiety disorders, is explained mainly through neurobiological and cognitive behavioural models, and its treatment is planned accordingly. While the evidence-based effectiveness of cognitive behavioural therapy (CBT) in managing symptoms is beyond dispute, psychoanalytic theory offers an indispensable perspective for understanding the deep, symbolic meaning and origins behind the surface symptoms of OCD. This article examines OCD from classical and modern psychoanalytic perspectives. It explores the thesis that OCD is the product of a conflict, in the person’s unconscious, between unacceptable drives (the id) and an excessively punitive conscience (the superego), and that compulsions are primitive defence mechanisms developed by the ego (especially undoing, reaction formation and isolation) to cope with the overwhelming anxiety this conflict creates. This perspective conceptualises OCD symptoms not as a heap of meaningless, ego-dystonic (alien to the self) behaviours but as a painful yet meaningful solution the person has found to preserve their intrapsychic balance.
Obsession
The word comes from the Latin obsidere (to besiege, to occupy). It refers to a person being unable to free themselves from a particular mental content, which is repetitive and persistent. This content may be a thought, an impulse, an urge, an image or a mixture of these. Experiencing it as intrusive and unwanted, and feeling marked distress or anxiety because of it, the person tries to free themselves from the negative effect of these thoughts, images or urges by pushing them away, trying not to think about them, acting as if they do not exist, or through compulsive acts.
Compulsion
The word comes from the Latin compellere, meaning “to force, to drive into a corner”. Compulsions are repetitive behaviours or mental acts carried out to relieve the distress or anxiety caused by an obsession or to prevent some feared event or situation.
While the person is passive in the face of an obsession, compulsion refers to an active state in which they cannot stop themselves from repeatedly carrying out a particular act in response to the distress the obsession creates. These behaviours or mental acts are not realistically connected with what they are meant to neutralise or prevent, or they are clearly excessive.
Insight in OCD can take three forms. A person with good insight recognises that their beliefs are not true. A person with poor insight thinks their beliefs are “probably” true. A person with absent insight, or delusional beliefs, is “completely” convinced their beliefs are true.

Obsessional neurosis in psychoanalytic theory
At the end of the 19th century, Sigmund Freud put forward the first scientific hypotheses about obsessive-compulsive disorder. OCD had been described long before Freud, but rather than as a separate nosological category, it had been explained as mental degeneration or, as Janet proposed, as psychic weakness. For Freud, the illness was the prototype of the neuroses and one of the most interesting and fruitful areas of psychoanalysis. He wrote more about it than about other illnesses, with 14 works on obsessional neurosis.
Here is a passage from Freud’s descriptions of OCD a century ago:
“The patient’s mind is occupied with thoughts that do not really interest him, he feels impulses which seem alien to him, and he is obliged to perform actions which give him no pleasure but which he is powerless to omit. The thoughts (obsessions) may be meaningless in themselves, or only of no interest to the patient; they are often completely silly. Although these thoughts are never actually carried out, they make the patient constantly avoid situations that remind him of them. The actions he performs against his will are nothing more than exaggerated and ceremonial forms of ordinary activities of daily life, such as washing; yet these harmless acts, called obsessive actions or compulsions, are carried out against his will.”
According to Melanie Klein (1940), obsessional symptoms are an attempt at reparation.
More recent researchers such as Mallinger and Salzman emphasise that the need for control dominates every area of obsessional people’s lives. Mallinger argues that symptoms appear when efforts at control fall short, and that fears of powerlessness lie beneath this obsessional striving for control.
From a developmental point of view, the need for control can be seen as arising from a perception of danger when the child cannot be sure of the continuity and reliability of their parents.
Salzman (1985) proposed that the dynamics of OCD involve an effort to prevent feelings of shame, loss of dignity, weakness and inadequacy, rather than anger.
Leib (2001) found that examining the mother–child relationship is very important in the analysis of OCD patients, and that in many of them the relationship with an internalised image of the mother as omnipotent, despotic and overprotective played a role in the development of the illness.
Meares, whose views on the “contamination–cleaning” subgroup are particularly notable, argues that the “omnipotence of thoughts”, which Freud also described as an important feature, is the core disturbance in OCD symptoms.
Below you will find a scientific text on how obsessive-compulsive disorder is understood and interpreted within psychoanalytic theory.
Obsessive-compulsive disorder (OCD) through the lens of psychoanalytic theory
Author: Prof. Dr. Ali Keyvan, Psychiatrist
Keywords: obsessive-compulsive disorder, psychoanalysis, psychodynamic, defence mechanisms, undoing, anal stage, superego.
1. Introduction: conflict, defence and meaning
OCD is characterised by recurrent, intrusive obsessions (thoughts, impulses or images) and compulsions (repetitive behaviours or mental acts) carried out to reduce the distress the obsessions cause. The clinical picture usually involves preoccupations with contamination, doubt, symmetry, or religious or sexual themes. Modern approaches often formulate the condition as a “brain circuit disorder” or the product of “faulty learning”. Psychoanalytic theory goes beyond the questions “what?” and “how?” and focuses on “why?”: why this particular thought? Why this seemingly meaningless ritual? This perspective aims to illuminate the personal history and unconscious drama behind the symptom.
2. The psychoanalytic formulation of OCD
2.1. The core conflict: drive (id) and conscience (superego)
According to psychoanalytic theory, OCD results from a fierce inner war between the three basic structures of the structural model:
The id: the source of raw, primitive drives, such as sexuality and aggression, that society does not accept. Obsessions in OCD are precisely these repressed id drives seeping into consciousness in disguise. For example, a blasphemous religious image that enters a devout person’s mind, or an impulse to harm her child that comes to a loving mother, are forbidden demands of the id.
The superego: made up of internalised social rules, moral values and parental prohibitions. In people with OCD, the superego is overdeveloped, rigid, punitive and merciless. It treats even the slightest forbidden thought from the id as a catastrophe and punishes the person with crushing guilt, shame and a sense of being contaminated.
The ego: the structure that tries to mediate between id and superego and maintains adaptation to reality. In OCD, the ego is weakened under the pressure of these two enormous forces. To cope with the unbearable anxiety created by the superego, it resorts to primitive, magical defence mechanisms, which appear in the clinical picture as compulsions.
2.2. Developmental roots: fixation at the anal stage
Freud linked the origins of OCD to a fixation at the anal stage (18 months – 3 years) of psychosexual development. This is the period in which, through toilet training, the child first learns to control impulses (letting go and holding on) and to follow social rules. Overly strict, rigid or shaming toilet training leaves the conflicts of this stage (autonomy versus shame, control versus chaos) unresolved. This predisposes the person to the traits described as the “anal character”: excessive orderliness, meticulousness, stubbornness, indecisiveness and stinginess. The core themes of OCD, namely control, dirt, doubt and perfectionism, are echoes of this stage. Under stress (for example, when facing Oedipal conflicts such as sexual responsibilities or rivalry in adulthood), the person regresses to these more primitive anal-stage conflicts, over which they feel they have some control.
2.3. Defence mechanisms: the meaning of compulsions
Compulsions are not meaningless or random acts. They are highly specific, meaningful strategies the ego uses to keep anxiety under control:
Undoing: the most characteristic defence mechanism of OCD. The person performs an act to magically “take back” or “neutralise” an unacceptable thought or impulse.
Example: someone who has the thought of harming a loved one (obsession) locks and unlocks the door three times (compulsion) to “undo” the bad outcome the thought might bring. Hand washing is a ritual of cleansing not only from physical dirt but from a morally “dirty” or sinful thought.
Reaction formation: the person develops an attitude or behaviour that is the exact opposite of the unacceptable impulse.
Example: a person with strong aggressive impulses may become excessively gentle, polite and careful never to hurt anyone. The extreme cleanliness of someone with contamination obsessions is a product of this mechanism.
Isolation of affect: through this mechanism, the patient can describe their most terrifying obsessive thoughts (“the idea of throwing my child off the balcony comes into my mind”) in an emotionless tone, as if telling someone else’s story. The thought is conscious, but the horror, fear or anxiety that should accompany it (the affect) has been isolated from it. This isolated anxiety becomes attached to the compulsive ritual.
3. Clinical implications and the therapeutic process
Unlike CBT, psychoanalytic psychotherapy does not focus directly on removing the symptom. Its aim is to decipher the meaning behind the symptom, bring the unconscious conflict into consciousness and strengthen the ego. The therapist helps the patient discover the repressed anger, sexual desires or guilt beneath their obsessions. As the patient recognises their compulsions as a primitive way of escaping anxiety, they begin to develop more mature ways of coping. The transference relationship that develops in therapy re-enacts the conflicts over control and autonomy the patient experienced with early parental figures and allows them to be worked through again in the therapeutic setting.
4. Conclusion
Psychoanalytic theory sees OCD not as the product of a “broken” mechanism but as a tragic and painful “solution” developed against an overwhelming inner conflict. Obsessions are forbidden desires; compulsions are magical antidotes to the guilt and anxiety these desires create. Although it is not a first-line approach in today’s treatment guidelines, the psychoanalytic perspective offers clinicians an invaluable richness in grasping the depth of the OCD patient’s inner world and the personal meaning of their symptoms, and so in placing treatment within a more holistic framework.
References
Topçuoğlu, V., et al. (2003). Obsesif kompulsif bozuklukta psikanalitik görüşler [Psychoanalytic views on obsessive-compulsive disorder]. Klinik Psikiyatri, 6(1), 46–50. Google Scholar
This page is for information only and does not replace diagnosis or treatment. If you have similar symptoms, please consult a mental health professional.

Your psychiatrist
Prof. Dr. Ali Keyvan
Prof. Dr. Ali Keyvan is a psychiatrist and psychotherapist. He practises, teaches and supervises cognitive behavioural and dialectical behaviour therapy as well as psychodynamic therapy and group analysis, and is a founding member of the Istanbul Group Analysis Association (IstGA). He sees clients at his clinic in Nişantaşı, Istanbul, and online.


