An evil troll, called "the devil", has made a magic mirror 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.
Years later, a little boy Kai and a little girl Gerda live next door to each other in thegarrets of buildings with adjoining roofs in a large city. One could get from Gerda's to Kai's home just by stepping over the gutters of each building. The two families grow vegetables and roses in window boxes placed on the gutters. Gerda and Kai have a window-box garden to play in, and they become devoted to each other as playmates.
Kai's grandmother tells the children about the Snow Queen, who is ruler over the "snow bees" — snowflakes that look like bees. As bees have a queen, so do the snow bees, and she is seen where the snowflakes cluster the most. Looking out of his frosted window one winter, Kai sees the Snow Queen, who beckons him to come with her. Kai draws back in fear from the window.
By the following spring, Gerda has learned a song that she sings to Kai: Roses flower in the vale; there we hear Child Jesus' tale! Because roses adorn the window box garden, the sight of roses always reminds Gerda of her love for Kai.
On a pleasant summer 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.
The following winter, Kai goes out with his sled to play in the snowy market square and — as was the custom — hitches it to a curious white sleigh carriage, driven by the Snow Queen, who appears as a woman in a white fur-coat. Outside the city she reveals herself to Kai and kisses him twice: once to numb him from the cold, and a second time to make him forget about Gerda and his family; a third kiss would kill him. She takes Kai in her sleigh to her palace. The people of the city conclude that Kai died in the nearby river. Gerda, heartbroken, goes out to look for him and questions everyone and everything about Kai's whereabouts. She offers her new red shoes to the river in exchange for Kai; by not taking the gift at first, the river lets her know that Kai did not drown. Gerda next visits an old sorceress with a beautiful garden of eternal summer. The sorceress wants Gerda to stay with her forever, so she causes Gerda to forget all about Kai, and causes all the roses in her garden to sink beneath the earth, since she knows that the sight of them will remind Gerda of her friend. Gerda's warm tears raise one bush above the ground, and it tells her that it could see all the dead while it was under the earth, and Kai is not among them. Gerda flees and meets a crow, who tells her that Kai is in the princess's palace. Gerda goes to the palace and meets the princess and the prince, who is not Kai, but looks like him. Gerda tells them her story, and they provide her with warm clothes and a beautiful coach. While traveling in the coach Gerda is captured by robbers and brought to their castle, where she befriends a little robber girl, whose pet doves tell her that they saw Kai when he was carried away by the Snow Queen in the direction of Lapland. The captive reindeer Bae tells her that he knows how to get to Lapland since it is his home.
The robber girl frees Gerda and the reindeer to travel north to the Snow Queen's palace. They make two stops: first at the Lapp woman's home and then at the Finn woman's home. The Finn woman tells the reindeer that the secret of Gerda's unique power to save Kai is in her sweet and innocent child's heart:
“I can give her no greater power than she has already," said the woman; "don't you see how strong that is? How men and animals are obliged to serve her, and how well she has got through the world, barefooted as she is. She cannot receive any power from me greater than she now has, which consists in her own purity and innocence of heart. If she cannot herself obtain access to the Snow Queen, and remove the glass fragments from little Kai, we can do nothing to help her.
When Gerda reaches the Snow Queen's palace, she is halted by the snowflakes guarding it. She prays the Lord's Prayer, which causes her breath to take the shape of angels, who resist the snowflakes and allow Gerda to enter the palace. Gerda finds Kai alone and almost immobile on a frozen lake, which the Snow Queen calls the "Mirror of Reason", on which her throne sits. Kai is engaged in the task that the Snow Queen gave him: he must use 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. Even if the Snow Queen were to return (although it is never said from where), she would be obliged to free Kai. Kai and Gerda then leave the Snow Queen's domain with the help of the reindeer, the Finn woman, and the Lapp woman. They meet the robber girl, and from there they walk back to their home, "the big city."
Kai and Gerda find that everything at home is the same and that it is they who have changed; they are now grown up, and are also delighted to see that it is summertime.
At the end, the grandmother reads a passage from the Bible:
"Assuredly, I say to you, unless you are converted and become as little children, you will by no means enter the Kingdom of Heaven" (Matthew 18:3).