The tale begins with two will-o'-the-wisps who wake a ferryman and ask to be taken across a river. The ferryman does so, and for payment, they shake gold from themselves into the boat. This alarms the ferryman, for if the gold had gone into the river, it would overflow. He demands as payment: three artichokes, three cabbages, and three onions, and the will-o'-the-wisps may depart only after promising to bring him such. The ferryman takes the gold up to a high place, and deposits it into a rocky cleft, where it is discovered by a green snake who eats the gold, and finds itself luminous. This gives the snake opportunity to study an underground temple where we meet an old man with a lamp which can only give light when another light is present. The snake now investigates the temple, and finds four kings: one gold, one silver, one bronze, and one a mixture of all three.
The story then switches over to the wife of the old man, who meets a melancholy prince. He has met a beautiful Lily, but is distressed by the fact that anyone who touches her will die. The snake is able to form a temporary bridge across the river at midday, and in this way, the wife and prince come to the beautiful Lily's garden, where she is mourning her fate. As twilight falls, the prince succumbs to his desire for the Beautiful Lily, rushes towards her, and dies. The green snake encircles the prince, and the old man, his wife, and the will-o'-the-wisps form a procession and cross the river on the back of the snake.
Back in the land of the senses, and guided by the old man, the Lily is able to bring the prince back to life — albeit in a dream state — by touching both the snake and the prince. The snake then sacrifices itself, and changes into a pile of precious stones which are thrown into the river. The old man then directs them towards the doors of the temple which are locked. The will-o'-the-wisps help them enter by eating the gold out of the doors. At this point, the temple is magically transported beneath the river, surfacing beneath the ferryman's hut — which turns into a silver altar. The three kings bestow gifts upon the sleeping prince and restore him. The fourth, mixed king collapses as the will-o'-the-wisps lick the veins of gold out of him. We also find that Lily's touch no longer brings death. Thus, the prince is united with the beautiful Lily, and they are married. When they look out from the temple, they see a permanent bridge which spans the river — the result of the snake's sacrifice — "and to the present hour the Bridge is swarming with travellers, and the Temple is the most frequented on the whole Earth".