The action unfolds on the outskirts of the village of Dikanka in Ukraine in the 18th century.
Act I
On the last night before Christmas, the witch Solokha begins to chant kolyady in accordance with an ancient custom.
Suddenly, however, her friend appears – the Devil. He is absolutely furious with her son Vakula as "the day before he painted the Devil for a laugh, being chased by branches and switches of twigs." Having resolved to make things difficult for him, the Devil persuades Solokha to steal the moon and cause a snowstorm. It will then become dark, Chub will remain at home beside the hearth and Vakula will be unable to visit his daughter, the beautiful Oxana. Solokha agrees. Chub is dearer to her than all the Cossacks of Dikanka: he is a widower and he is rich, and she is not averse to laying her hands on his wealth. Solokha and the Devil cause a snowstorm and steal the moon. Panas, who has had a little too much to drink, comes out of the inn and sets out for Chub's house, resolving to continue the Christmas Eve festivities there. But Chub himself comes out and calls on Panas to join him for Christmas pudding at the Deacon's. There will be tasty brandy with saffron there. The snowstorm worsens, and Panas and Chub lose their way.
Vakula is unable to sleep either. Anxiously, he paces around Chub's house: how can he learn whether or not the proud Oxana loves him?
Having got lost in the dark, Panas returns to the inn, but Chub, having strayed and been unable to find the Deacon's house, goes home. But he finds Vakula at his house. "No, it's not my house, the smith will not enter my house," Chub resolves and sets out to visit Solokha. And Vakula, by now having cast off all doubts, plans to declare his love for Oxana. The snowstorm breaks up.
Oxana admires herself in the mirror. Vakula, having entered unseen, is enchanted by her beauty. But it is not so easy to win her heart. She teases Vakula, as if she is bored with him, and she waits for her friends to come and sing carols, because there will be boys there – "great stories will be told." And there they are now!
One of her friends, Odarka, is wearing new high-heeled boots. Oxana laments that no-one will give her such a present. In answer to Vakula's promise to get her any boots that she desires, before everyone Oxana declares "If he gets me the boots worn by our Empress Mother herself then I will marry him!"
Frozen from the cold, Solokha and the Devil warm themselves up indoors, singing and dancing. Unexpectedly, there is a thunderous knocking at the door. Solokha only just succeeds in concealing the Devil in a sack when the Village Elder enters. He has been summoned for Christmas pudding at the Deacon's, but having seen a light in Solokha's house he decides to spend the evening with her. He has just drunk a glass of vodka when there is more knocking. Solokha hides the Elder, shoving him into another sack, and admits the Deacon. Having decided not to wait for his guests who must be afraid of the snowstorm, the Deacon had the happy idea of coming to see Solokha. But his attentions are interrupted by a loud knocking. It is Chub. Having quickly hidden the Deacon in the final sack, Solokha warmly welcomes this desired guest.
Unexpectedly, however, Vakula returns home. Half frightened to death, Solokha hides Chub in the same sack already holding the Deacon. Vakula wishes to take the sacks out of the house – because "tomorrow is a holy day". The smith hoists the sacks onto his back and sets off for the forge.
On this Holy Night the young men and women are having fun. There are games, jokes and dressing-up fun. The drunken Panas is capering around. Oxana, too, is having fun. On seeing Vakula, she tells him once again: "Get the boots, smith, and I will marry you!" But Vakula no longer wishes to be deceived by the proud girl; he decides to leave the village.
All are perturbed: has the smith's reason been touched, might he not harm himself in his grief? The Woman with the Normal Nose and the Woman with the Purplish Nose rush off to spread a rumour throughout the village: one that the smith has hanged himself, the other that "the poor soul has thrown himself into an ice-hole." Oxana, too, is worried – what if, in his anguish, he falls in love with another girl and starts calling her the most beautiful! But here she espies the sacks left by Vakula. The young people untie them. One after another, Solokha's confused admirers emerge from the sacks – Chub, the Elder and the Deacon. The crowd erupts into unrestrained laughter.
Act II
Vakula, taking only a small sack with him, departs to get advice from the old sorcerer Patsyuk. There is talk that he knows all the devils. The smith asks Patsyuk to show him the way to the Devil: only he can assist him in his grief. "It is not far to the one on whose shoulders the Devil sits," Patsyuk calmly answers. The amazed Vakula sees how the Devil pops out of the sack, willing to help him if the smith will sell his soul. Pretending to sign a note in blood, Vakula suddenly grasps the Devil by his tail and produces a crucifix. Threatened by the sign of the cross, the Devil promises the smith to do everything he wishes. Vakula orders that he be brought to the Empress, and they set off.
An ethereal space. There are songs and dances of the stars. The planets soar in the sky. Witches, sorceresses and hags of Kiev are assembling for their Sabbath. Patsyuk and Solokha are among the evil spirits. They are singing a chant of madness. On seeing Vakula with the Devil, they attempt to block the smith's path, but he holds a crucifix firmly in his hand.
There are fanfares, people are running about and the young men and women are in great uproar – now they are to see St Petersburg and the Empress herself. The Court ladies, gentlemen and Zaporozhians harmoniously perform a polonaise. The Empress herself appears. Vakula falls at her feet: "If only my woman had such boots to wear!" The Empress likes the smith's simple style of speech. She will present him with her finest boots! Christmas Eve is approaching its end. Soon the sun will rise. Without a backwards glance, the evil spirits flee from the dawn, Vakula is carried back by the Devil, the precious cargo for Oxana in his arms. It becomes light. The girls come out, spinning a wheel – a symbol of the sun, a symbol of the earth's fecundity, of light and of life. Kolyada appears in a golden carriage, met in return by Ovsen in the form of a handsome youth. Church bells ring out – Christmas and Love have come to the world.
Act III
Oxana is sad; she has already come to understand that there is no lad who loved her as much as Vakula. Since morning the two women have been chattering that the smith has hanged himself and has drowned himself. Having argued to the point of fighting, the women run away. Chub also makes his way home.
Oxana is left alone and does not notice Vakula, who finally hears that she "has fallen in love" with him. The beautiful girl no longer needs the boots – she is ready to marry the smith without them. Chub, too, agrees to this: he cannot forget the treacherous Solokha, and Vakula's gifts from St Petersburg – a colourful belt and an astrakhan hat – are so very fine!
Chub summons the people of Dikanka – soon there will be a wedding! All are delighted at Vakula's return.