In his preface to Yayati, Khandekar states that he was drawn to the original story from the Mahabharata at multiple levels, and for many reasons. The resulting novel is a modern retelling of the story of the Hindu king, who enjoyed all the pleasures of the flesh for a millennium only to realise how empty of meaning was his pursuit of desire.[2]
Khandekar saw modernity, with its materialistic values, as an elephant on the rampage through the delicate garden of traditional virtues and feelings, blurring the distinction between good and evil, between selfishness and compassion, and blinding people to the evils of the world. In response, Khandekar looked to the past and chose the story of Yayati, making use of a kind of tale often dismissed as the fairy stories of old women to describe the vacuousness and futility of contemporary society's endless obsession with avarice and lust. Where Khandekar's previous writing had focused predominantly on style and imagination, in Yayati these concerns are integrated into a form of social realism the author had little explored until this point.
The story is taken from the Yayatopakhyan (lit. The Story of Yayati), a sub-narrative in Adi Parva (The Book of the Beginning) of the Mahabharata. Khandekar builds the original material into a full-length novel, adding several new episodes and developing the narrative as a love story with a theme of morality. In so doing, Khandekar brings new relevance and meaning to the story in the context of modern life. For Khandekar, this novel represents the common man, who "in spite of varied happiness is always discontented and restless, and is blindly running after new pleasures".