The Ashokavadana (Sanskrit: अशोकावदान; IAST: Aśokāvadāna;  "Narrative of Ashoka") is an Indian Sanskrit-language text that describes the birth and reign of the third Mauryan Emperor Ashoka. It contains legends as well as historical narratives, and glorifies Ashoka as a Buddhist emperor whose only ambition was to spread Buddhism far and wide.
 Ashokavadana, also known as Ashokarajavadana, is one of the avadana texts contained in the Divyavadana (Divyāvadāna, "Divine Narrative"), an anthology of several Buddhist legends and narratives. According to Jean Przyluski, the text was composed by the Buddhist monks of the Mathura region, as it highly praises the city of Mathura, its monasteries and its monks.
 There are several versions of Ashokavadana, dating from 5th century CE to 16th century CE. Some date the earliest finished form of the text back to 2nd century CE, although its oral origins may go back to 2nd century BCE.
 The extant version of Ashokavadana is a part of Divyavadana, a Sanskrit-language anthology of Buddhist legends. However, its ancient Chinese translations A-yu wang chuan (c. 300 CE), and A-yu wang ching (c. 512 CE) suggest that it once existed as an independent text.
 Ashokavadana was translated into Chinese by An Faqin (安法欽) in 300 CE as A-yu wang chuan (阿育王传, the narrative of King Ashoka), and later as Ayu wang ching (zh:阿育王经) by Sanghapala in 512 CE. A-yu wang chuan was translated into French by Jean Przyluski in 1923.
 Annotated sections of the Ashokavadana are part of Rajendralala Mitra's (1822–91) "The Sanskrit Buddhist Literature of Nepal". Mitra extensively uses the translation made by M. E. Burnouf.[citation needed]
 An English translation of Ashokavadana by John S. Strong was published in 1983 by Princeton University (Princeton University Press).
 The text begins with the stories about the Buddhist monk Upagupta, who eventually becomes Ashoka's spiritual teacher. It describes one of Upagupta's past lives, his present early life as the son of a perfume merchant in Mathura. It then describes his youth, including his encounters with a courtesan named Vasavadatta. Finally, it talks about his ordination as a monk and his conversion of the demon Mara.
 Next, the text describes one of Ashoka's previous births, when he was named Jaya. It states that Jaya met Gautama Buddha as a young boy, and gave him a bowl of dirt, dreaming that the dirt is food. The Buddha then predicted that several years after his parinirvana, the boy would be born as a chakravarti king ruling from Pataliputra. The text then moves to Ashoka's present life as a son of king Bindusara.
 In the text, Ashoka's father dislikes him because of his ugliness, although a fortune-teller predicts that Ashoka would become the next king. Indeed, Ashoka kills his step-brother - the legitimate heir - by tricking him into entering a pit with live coals, and becomes the king. He turns out to be an oppressive and cruel ruler, becoming notorious as "Ashoka the Fierce". He has 500 of his ministers killed, because he believes them to be not loyal enough, and has 500 women in his harem burnt to death because some of them insult him. He builds Ashoka's Hell, where people are randomly tortured and killed. One day, he encounters a Buddhist monk, who is not troubled by any of the sufferings, and is able to perform magical feats. Impressed by the monk, Ashoka converts to Buddhism, becomes a pious man and builds 84,000 stupas, becoming famous as "Ashoka the Righteous" (Dharma-Ashoka).
 The text describes in detail the efforts of Ashoka towards the expansion of Buddhism: Ashoka first converts his brother Vitashoka to Buddhism, and teaches his minister Yashas to honor the Buddhist monks. Next, he meets Upagupta and goes on a pilgrimage to the holy places associated with the Gautama Buddha's life, accompanied by Upagupta. He then visits the Bodhi Tree in Bodh Gaya, where the Buddha was enlightened. Every five years, he holds a great festival to entertain Buddhist monks. During the festival, he meets Pindola Bharadvaja, an arhat (enlightened saint) who personally knew the Buddha and had extended his lifespan using supernatural powers to propagate Buddha's teachings.
 The text then narrates the story of Ashoka's son Kunala: the prince is a handsome and righteous man loved by his father. As a result of a plot hatched by his step-mother Tisyaraksita, Kunala is blinded while away from the royal capital. He attains enlightenment, and wanders as a beggar, earning living by singing and playing veena. He eventually returns to the capital, and meets his father.
 The text describes Ashoka's last days as follows: Ashoka becomes terminally ill, and starts making generous donations to Buddhist monks using state funds. In order to prevent him from emptying the royal treasury, his ministers deny him access to the state funds. Ashoka then starts donating his personal wealth, but is similarly restricted from doing so. On his deathbed, his only possession is half of a myrobalan fruit, which he offers to the Buddhist sangha (monastic community) as his final donation. He then dies with no possessions left to his name.
 Finally, the text narrates the story of king Pushyamitra, whom it describes as a descendant of Ashoka. Pushyamitra persecutes Buddhist monks, thus trying to undo Ashoka's legacy.
 Ashokavadana mentions two incidents of Ashoka turning towards violence after adopting Buddhism. In one instance, a non-Buddhist in Pundravardhana drew a picture showing the Buddha bowing at the feet of Nirgrantha Jnatiputra (identified with Mahavira, the 24th Arihant of Jainism). On complaint from a Buddhist devotee, Ashoka issued an order to arrest him, and subsequently, another order to kill all the Ajivikas in Pundravardhana. Around 18,000 followers of the Ajivika sect were executed as a result of this order. Sometime later, another Nirgrantha follower in Pataliputra drew a similar picture. Ashoka burnt him and his entire family alive in their house. He also announced an award of one dinara (silver coin) to anyone who brought him the head of a Nirgrantha heretic. According to Ashokavadana, as a result of this order, his own brother, Vitashoka, was mistaken for a heretic and killed by a cowherd. Their ministers advised him that "this is an example of the suffering that is being inflicted even on those who are free from desire" and that he "should guarantee the security of all beings". After this, Ashoka stopped giving orders for executions.
 According to K. T. S. Sarao and Benimadhab Barua, stories of persecutions of rival sects by Ashoka appear to be a clear fabrication arising out of sectarian propaganda. Ashoka's own inscriptions Barabar Caves record his generous donations and patronage to Ajivikas.
 The Ashokavadana ends with the story of Pushyamitra (185–151 BCE), the Shunga king whose rule succeeded the Mauryan empire. However, the text wrongly mentions him as a member of the Maurya family. It has often been quoted for its disparaging description of Pushyamitra as an enemy of the Buddhist faith, which before him had been officially supported by the Mauryan empire:
 ... Pushyamitra equipped a fourfold army, and intending to destroy the Buddhist religion, he went to the Kukkutarama. ... Pushyamitra therefore destroyed the sangharama, killed the monks there, and departed. ... After some time, he arrived in Sakala, and proclaimed that he would give a ... reward to whoever brought him the head of a Buddhist monk. Like other portions of the text, these accounts are regarded by many historians as being exaggerated.