The Devil's Mirror is a magical object created by an evil troll (or the devil) that distorts the appearance of everything it reflects. It fails to reflect the good and beautiful aspects of people and things, while magnifying their bad and ugly aspects. The devil, who is headmaster at a troll school, takes the mirror and his pupils throughout the world, delighting in using it to distort everyone and everything; the mirror makes the loveliest landscapes look like "boiled spinach." They try to carry the mirror into heaven with the idea of making fools of the angels and God, but the higher they lift it, the more the mirror shakes with laughter, and it slips from their grasp and falls back to earth, shattering into billions of pieces, some no larger than a grain of sand.
These splinters are blown by the wind all over the Earth and got into people's hearts and eyes, freezing their hearts like blocks of ice and making their eyes like the troll-mirror itself, seeing only the bad and ugly in people and things.
One summer's day, splinters of the troll-mirror get into Kai's heart and eyes while he and Gerda are looking at a picture book in their window-box garden. Kai becomes cruel and aggressive. He destroys their window-box garden, he makes fun of his grandmother, and he no longer cares about Gerda, since all of them now appear bad and ugly to him. The only beautiful and perfect things to him now are the tiny snowflakes that he sees through a magnifying glass.
Close to the end of the fairy tale, when Gerda finds the Snow Queen's ice palace and Kai on a frozen lake where sits the Snow Queen's throne, she discovers the Snow Queen has tasked Kai with using pieces of ice like a Chinese puzzle to form characters and words. If he is able to form the word "eternity" (Danish: Evigheden), the Snow Queen will release him from her power and give him a pair of skates. Gerda runs up to Kai and kisses him, and he is saved by the power of her love: Gerda weeps warm tears on him, melting his heart and burning away the troll-mirror splinter in it. As a result, Kai bursts into tears (which dislodge the splinter from his eye) and becomes cheerful and healthy again with sparkling eyes and rosy cheeks, and also recognizes Gerda. He and Gerda dance around on the lake of ice so joyously that the splinters of ice Kai had been playing with are caught up into the dance. When they tire of dancing they fall down to spell "eternity," the very word Kai was trying to spell. With the Snow Queen defeated and returned to where she came from, Kai is freed and the two return home. There is no other mention of the Devil's Mirror.