Serotonin fosters cognitive flexibility, but how, exactly, remains unclear. We show that serotonin reduces belief stickiness: the tendency to get “stuck” in a belief about the state of the world despite incoming contradicting evidence. Participants performed a task assessing belief stickiness in a randomized, double-blind, placebo-controlled study using a single dose of the selective serotonin reuptake inhibitor (SSRI) escitalopram. In the escitalopram group, higher escitalopram plasma levels reduced belief stickiness more, resulting in better inference about the state of the world. Moreover, participants with sufficiently high escitalopram plasma levels had less belief stickiness, and therefore better state inference, than participants on placebo. Exaggerated belief stickiness is exemplified by obsessions: “sticky” thoughts that persist despite contradicting evidence. Indeed, participants with more obsessions had greater belief stickiness, and therefore worse state inference. The opposite relations of escitalopram and obsessions with belief stickiness may explain the therapeutic effect of SSRIs in obsessive-compulsive disorder.