This story is retold by Rudy Panko from Foma Grigorievich, the sexton of the Dikanka church. Rudy was in the middle of reading the story to the reader, when Foma butts in and demands to tell it his way. His grandfather used to live in an old village not far from Dikanka that no longer exists. There lived a Cossack named Korzh, his daughter Pidorka and his worker Petro. Petro and Pidorka fall in love, but Korzh catches them one day kissing and is about to whip Petro for this, but stops when his son Ivas pleads for his father to not beat the worker. Korzh instead takes him outside and tells him to never come to his home again, putting the lovers into despair. Petro wants to do whatever he can to get her, and meets up with Basavriuk, a local stranger who frequents the village and many believe to be the devil himself. Basavriuk tells Petro to meet him in Bear’s Ravine and he’ll show him where treasure is in order to get back Pidorka.
He has to find a fern that blooms on St John's Eve, a folk legend not based in fact. Basavriuk tells Petro to pluck the flower he finds, and a witch appears who hands him a spade. When he finds the treasure with the spade, he cannot open it until he sheds blood, which he agrees to do until he finds that they captured Ivas in order to acquire it. He refuses at first but in a fury of uncertainty lops off the child’s head and gets the gold. He falls asleep for two days and when he awakens he sees the gold but cannot remember how he got it. After they are married, things go downhill and Petro becomes increasingly distant and insane, thinking all the time that he has forgotten something. Eventually, after a time, Pidorka is convinced to visit the witch at Bear’s Ravine for help, and brings her home. Petro then remembers, upon seeing her, what happened and tosses an axe at the witch, who disappears. Ivas appears at the door with blood all over him and Petro is carried away by the devil. All that remains is a pile of ashes where he once stood and the gold has turned into pieces of broken pottery.
After this, Basavriuk begins to appear in the village again and Pidorka goes on a pilgrimage. Foma’s grandfather’s aunt still had problems with the devil however; a party is ruined when a roast lamb comes alive, a chalice bows to his grandfather and a bowl begins to dance. Even after sprinkling the entire area with holy water the tavern is still possessed, so the village becomes abandoned.