The Pregnant King is a 2008 book by Devdutt Pattanaik. It follows the story of Yuvanashva, a childless king, who accidentally drinks the magic potion meant to make his queens pregnant. It is set in the backdrop of the Mahabharata and makes references to characters and incidents in the Kurukshetra as well as the Ramayana.
 Among the many lesser-known sub-stories in the Mahabharata is one told by the sage Lomasa to the exiled Pandavas, about a king named Yuvanashva who accidentally gets pregnant, later revealed that it was no accident but by design by the ghosts of 2 young boys who were burned alive by the King at the stake. For the author, Devdutt Pattanaik, a medical doctor, marketing consultant and mythologist deeply interested in the relevance of old myths in modern times, this was an instantly intriguing story. Pattanaik had written several books on myths and rituals, but The Pregnant King is his first work of fiction, a retelling of the Yuvanashva tale to examine gender roles, the blurring of lines between parental duties and the malleability of Dharma to fit a given situation.
 The conflict between desire and social obligation/destiny is a major theme in the book. It also speaks about questions around the idea of gender.
 The chronology of events as recorded in the Mahabharata has been manipulated and the story of Yuvanashva, replete with characters churned out of the author's imagination, has been woven in. The protagonist, King Yuvanashva is the well liked ruler of Vallabhi, an obedient son, a devoted husband who aspires to be  just towards all and uphold Dharma in his kingdom. From the onset of the story, the epic battle of Kurukshetra is imminent but the king's mother, Shilavati, refuses to give her consent since he's yet to sire an heir. Despite having three wives and several years of futile rituals the king has reached a point of desperation. So he seeks the help of the two Siddhis, Yaja and Upayaja, who after an elaborate ritual create a potion meant for his queens but drinks it ‘accidentally’ and ends up pregnant himself. The incident is hidden from everyone including the child except the wives, Shilavati and Asanga, the healer. After given birth to son, Mandhata, he successfully impregnates his second wife, Pulomi. The king who has lived his whole life by the code of Dharma now finds himself in a dilemma. “I am not sure that I am a man…I have created life outside me as men do. But I have also created life inside me, as women do. What does that make me? Will a body such as mine fetter or free me?”
 The irony of the whole story is that the king who is supposed to be the epitome of manhood and upholder of Dharma longs till his last breath to be called ‘mother’ just once by Mandhata. "What sounds sweetest, being called Mother or being called Father"?
 The novel also delves into the stories of other characters like Shilavati, the ambitious and sharp princess who cannot be king because she's a woman. Widowed at a young age she becomes the regent but this disturbs the Brahmin elders because “they were not used to a leader who nursed a child while discussing matters of dharma”. (It's notable that the unconventionality of Shilavati's own life doesn't make her any more tolerant of her son's situation later on, which underlines the point that non-conformity/anti-tradition can take many forms, and these aren’t always kindred spirits.) It also tells the story of Somvat and Sumedha, two childhood friends who decide to get married despite being men. Sthunakarna, a yaksha, who forsakes his manhood to make Shikhandi a husband and then reclaims it to make Somvat a wife. Arjuna, the great warrior with many wives forced to masquerade as a eunuch after being castrated by a nymph. Adi-natha, the teacher of teachers, worshipped as a hermit by Yaja and an enchantress by Upayaja. It's also the story of the patron god of Vallabhi, Ileshwar Mahadev, who becomes God on full moon days and Goddess on new moon nights.
 Throughout the book, the author highlights the paradoxes and ambiguities of gender and thus, life. He also uses the shift in chronology to use episodes in the epic of Mahabharata as parallels or counterpoints for the Yuvanashva story. The characters in this book make chatty references to the lives of their more famous contemporaries in Hastinapur as mentioned in the Mahabharata.
 The question of whether the 'impotent' Pandu and the 'blind' Dhritrashtra were fit to become kings is set against similar dilemmas involving characters in Vallabhi. There's some healthy irreverence on view: when a messenger arrives with the momentous news that the war is over, no one in the kingdom is particularly interested, being more concerned about internal matters. When the hero Arjuna makes what amounts to a guest appearance and is asked about a story Bhishma narrated to the Pandavas before he died, his reply is a curt, “I’m sorry but I remember no such story. He said so many things” – a neat dismissal of the ponderous Shanti Parva, Bhishma's long deathbed discourse about a king's duties.
 The story largely seems obsessed with the definition of gender, man? or women? does the flesh matter? What about the soul? It also talks about marriage and child birth. There are multiple references to bulls, fields, soil and seeds as euphemisms for sex and conception, and to illuminate the vexing question of “ownership” that arises when a woman is made pregnant by someone other than her husband. And then there are those troublesome dead ancestors, the “pitrs”, waiting for the arrival of a child so they can be reborn in the land of the living. Taking the form of crows, they perch outside bedchambers, waiting for quick results, flapping their wings impatiently when foreplay goes on for too long. (“Does it not bother you that your son’s seed is weak?” one of them indelicately asks Shilavati.)
 The Pregnant King isn't a consistently satisfying work – It keeps the reader interested for the larger part but at places it's punctuated with staccato sentences (“That’s what they were. Vehicles of an idea. Two ideas. No. One idea, two expressions. Two halves of the same idea. Mutually interdependent”) that have a broader philosophy. The occasional forced attempt at informality, and some philosophical statements towards the end (“Within you is your soul, Adi-natha as Shiva, silent, observant, still. Around you is matter, Adi-natha as Shakti, ever-changing, enchanting, enlightening, enriching, empowering”). But in a sense, this book is meant for just such readers as the author hopes to make us realise that in the rush to deem situations Black or White, the vast expanse of grey needs to be acknowledged and dealt with as well.  “The imperfection of the human condition and our stubborn refusal to make room for all those in between” is a cautionary tale for our own times.
 The book tells a striking story which meanders in various directions.
 The book was adapted into a 2015 play, Flesh, by director and script writer Kaushik Bose. The play revolves around the question of gender and motherhood. The play was produced by Theatreworms Productions.