The story is told by a narrator who claims to have known Lothar. It begins by quoting three letters:
1. A letter from Nathanael to Lothar, the brother of his fiancée, Clara. Nathanael recalls his childhood terror of the legendary Sandman, who was said to steal the eyes of children who would not go to bed and feed them to his own children who lived in the moon. Nathanael came to associate the Sandman with a mysterious nightly visitor to his father. He recounts that one night, he hid in his father's room to see the Sandman. It is Coppelius, an obnoxious lawyer come to carry out alchemical experiments. Coppelius begins taking "shining masses" out of the fire and hammering them into face-like shapes without eyes. When Nathanael screams and is discovered, Coppelius flings him to the hearth. He is about to throw fire embers into Nathanael's eyes when his father pleads he be permitted to keep his eyes. Coppelius instead twists Nathanael's hands and feet and tortures him until he passes out. A year later, another night of experiments caused his father's death in the presence of Coppelius, who then vanished without a trace. His father having died of some sort of flaming explosion, the burns to his face are gone before he is laid in his coffin. Nathanael believes that a barometer-seller who arrived recently at his rooms under the name Giuseppe Coppola is none other than the hated Coppelius, and he is determined to seek vengeance.
2. A letter from Clara to Nathanael, explaining that Nathanael had addressed the previous letter to her instead of to Lothar. She was touched at the account of Nathanael's childhood trauma, and discussed it with Lothar, but she is convinced that the terrors are of Nathanael's own imagining and urges him to put Coppelius/Coppola out of his mind.
3. A letter from Nathanael to Lothar, in which Nathanael declares that Coppola is not, after all, Coppelius: Coppola is clearly Italian, while Coppelius was German, and Coppola is also vouched for by the new physics professor, Spallanzani, who is also Italian and has known Coppola for years. Nathanael adds that Spallanzani has a daughter, Olimpia, a brief glimpse of whom has made a considerable impression upon him.
Shortly after this third letter, Nathanael returns to his home town from his studies to see Clara and Lothar, and in the joy of their reunion Coppelius/Coppola is at first forgotten. Nevertheless, the encounter with Coppola has had a profound effect on Nathanael, driving him toward a gloomy mysticism which bores Clara and leads to their gradual estrangement. He writes a poem about Coppelius destroying his happiness in love, in which Coppelius appears at his wedding to touch Clara's eyes and then throws Nathanael into a circle of fire. After he emotionally reads this poem to her, she tells him to throw the insane poem into the fire. Nathanael's frustration with this leads him to call her an "inanimate, accursed automaton", which so enrages Lothar that he in turn insults Nathanael, and a duel is only narrowly averted by Clara's intervention. Nathanael pleads for Clara's forgiveness, and declares his true love for her, and the three then reconcile.
Nathanael returns to complete the final year of his studies, after which he intends to return to his hometown forever. He finds his student lodgings destroyed by fire, though his possessions were rescued by his friends and moved to a new house which is opposite that of Spallanzani. His window now looks directly into that of Olimpia, and he is again struck by her beauty. Coppola calls to sell his wares, and offers "pretty eyes, pretty eyes!" which reawakens Nathanael's childish fear of the Sandman. However, it turns out that Coppola has lenses and spectacles to sell, and also small telescopes, and Nathanael buys one of these from him to set matters right after his earlier outburst. As Coppola leaves, Nathanael becomes fixated on watching Olimpia through his telescope, although her fixed gaze and motionless stance disconcert him.
Spallanzani gives a grand party at which it is reported that his daughter will be presented in public for the first time. Nathanael is invited, and becomes enraptured by Olimpia, who plays the harpsichord, sings and dances. Her stiffness of movement and coldness of touch appear strange to many of the company. Nathanael dances with her repeatedly, awed by her perfect rhythm, and eventually tells her of his passion for her, to which Olimpia replies only "Ah, ah!". During the following days, he visits Olimpia repeatedly, reading her the poems and mysticism that had so bored Clara, and Olimpia listens to it all and replies only "Ah, ah!", which Nathanael interprets as understanding. Most other people consider her dull and stupid, although pretty, and with strangely mechanical actions.
Eventually Nathanael determines to propose to Olimpia, but when he arrives at her rooms he finds an argument in progress between Spallanzani and Coppola, who are fighting over the body of Olimpia and arguing over who made the eyes and who made the clockwork. Coppola, who is now revealed as Coppelius in truth, wins the struggle, and makes off with the lifeless and eyeless body, while the injured Spallanzani urges Nathanael to chase after him and recover the automaton to which he has devoted so many years of his life. The sight of Olimpia's eyes lying on the ground drives Nathanael to madness, and he flies at the professor to strangle him. He is pulled away by other people drawn by the noise of the struggle, and in a state of insanity, is taken to an asylum.
Spallanzani recovers from the encounter, but is forced to leave the university because of the sensational revelation of the trick he had played in trying to pass off an automaton as a living person. Coppelius once more vanishes without trace. The narrator adds that the story of the automaton had a widespread effect on society, with many lovers taking steps to ensure they were not enamoured of puppets but of real flesh and blood.
Nathanael appears to recover from his madness and is reunited with Clara and Lothar. He resolves to marry Clara and move to a pleasant estate near his home town. On the way to visit the place, they pass through the town and climb the high steeple to look out at the view. Clara points out a bush that seems to be striding towards them. Nathanael automatically withdraws Coppola's spyglass and, looking through it sideways, sees Clara through the lens. With Clara in place of Olimpia as the subject of the spyglass's gaze, madness strikes Nathanael again, and he tries to hurl Clara from the steeple. She is saved by Lothar, but in the crowd that gathers below Coppelius appears, and upon seeing him Nathanael cries "pretty eyes, pretty eyes!" and leaps over the railing to his death. Coppelius disappears into the crowd.
Many years afterward, the narrator concludes, it is said that Clara was seen with a kind-looking man sitting before a country house with two lovely boys, and thus found the domestic happiness that Nathanael could never have provided.
The story contains an example of a horrific depiction of the folklore character, the Sandman, who is traditionally said to throw sand in the eyes of children to help them fall asleep. The following excerpt is from an English translation of the story:
Most curious to know more of this Sandman and his particular connection with children, I at last asked the old woman who looked after my youngest sister what sort of man he was.
'Eh, Natty', said she, 'don't you know that yet? He is a wicked man, who comes to children when they won't go to bed, and throws a handful of sand into their eyes, so that they start out bleeding from their heads. He puts their eyes in a bag and carries them to the crescent moon to feed his own children, who sit in the nest up there. They have crooked beaks like owls so that they can pick up the eyes of naughty human children.'
The characters and the conflict are first defined in the story's three opening letters. Furthermore, the psychological conflict of the protagonist, Nathanael, is represented, who is torn between hallucinations and reality. Nathanael struggles his whole life against posttraumatic stress which comes from a traumatic episode with the sandman in his childhood experience. Until the end of the book it remains open whether this experience was real, or just a dream of the young Nathanael. The text clearly leaves the decision open in as much as it offers two understandings: that of Nathanael's belief that there is a dark power controlling him, and Clara's postulation (together with Lothar) against this that this is only a psychological element.
The story is partly a subjective description of the proceedings from Nathanael's viewpoint which, due to enormous psychological problems, is not likely objective – or possibly objectively portrayed. Hoffman consciously leaves the reader unsure. In this, the interpretation from an Enlightenment perspective makes sense against the Romantic view, whereby Klara represents the enlightenment and Nathanael the Romantics.
Of central importance is the "eyes" theme (interpreted by Freud in his 1919 essay, The Uncanny, as fear of castration), the "steps", the robot, and laughing. Hoffman, well known for not conforming to society, manages to give a satirical critique of society here, which offers a lesson to both Enlightened scientists and Romantic "hoverers and floaters".
The Coppelius/Coppola character can be considered not as a real physical character, but as a metaphor, like Nathanael does when he returns home. He represents the dark side within Nathanael. Note that the fight between Spallanzani and one or both of them for the "wooden doll" where we hear Coppelius's voice but see Coppola. There is also the motif of fists, where Coppelius is always described as having fists, but never hands.