Twenty-Two Goblins is a frame-tale collection from the Sanskrit, given in plain English by Arthur W. Ryder. King Triple-victory rules a kingdom on the Godavari River. A monk has flattered him with a gift each day, and at last asks a favor: on a dark night the king must go alone to a cemetery, climb a tree, and bring back a hanged corpse so the monk can complete a magic rite.
The body is inhabited by a goblin, a clever spirit who will not be carried quietly. To pass the time, the goblin says, it will tell the king a story. Each tale is short and ends in a sharp moral question, and the goblin binds the king with a curse: if the king knows the answer and withholds it, his head will burst. But the instant the king speaks, the corpse slips from his shoulder and flies back to the tree, and the weary king must fetch it again.
So the book becomes twenty-two rounds of the same test. The stories range across a familiar Indian story-world of kings and princesses, rival suitors, devoted wives, thieves, Brahmans, and shape-shifting fairies. The question at the end is almost always one of comparative worth or blame: whose fault was a death, which of several suitors deserves the bride, which of two self-sacrificing men is the more noble, what relation are two tangled families.
The king answers each riddle with brisk, confident reasoning. He weighs a person's duty against their station, intention against outcome, courage against cleverness, and law against passion. His verdicts reward steadiness, real bravery, and faithfulness to one's proper role, and they tend to forgive those who acted out of love or obligation while blaming those who knew better and acted carelessly. Every correct answer sends the goblin flying back, so the king's wisdom keeps prolonging his own ordeal.
On the final tale, the puzzle of who married whom and what their children are, the king cannot find an answer, so he walks on in silence. The goblin is delighted: the king's perseverance and his refusal to fake an answer prove his worth. The goblin then warns him that the monk means to murder him in the rite, and tells him how to turn the trap. The king kills the false monk, Shiva appears to bless him, and he asks only that these twenty-two puzzle-stories be honored everywhere.