It is based on story by Sir John Mandeville (who is referenced in-universe) and concerns the challenge of Prince Rupen of Etchmiadzin to keep a sparrowhawk in the Land of Faerie awake for seven days. If he successful, then he would win whatever earthly thing might be his heart's desire. If he fails, then not only will he forfeit his life, but his soul will be obliterated as well.
Rupen does succeed, and decides to make love to a beautiful fairy as his reward, despite her warnings that doing so may be perilous. In the end, his actions allow his vizier to oust Rupen while he's away. Rupen spends the remainder of the story first trying to get his throne back, and then finally giving up and becoming the leader of an army of bandits. As the story ends, Rupen thinks of the Castle of the Sparrowhawk for the first time in many years, and decides he would make the exact same choices.
While the story is a romance which takes place in no particular era, there are clues which suggest a setting at the close of the 13th century. Among these are the suggestion that the story takes places significantly before Mandeville but not too distant in his past, and a passing contemporary reference to both the Emperor of Byzantium and the Great Khan.