Ashoka was converted to Buddhism as a result of the Kalinga war.
According to tradition, he became a monk, made huge gifts to the Buddhists, and undertook pilgrimages to the Buddhist shrines.
His visits to Buddhist shrines is also suggested by the dhamma yatras mentioned in his inscriptions. According to tradition, Ashoka held the third Buddhist council (sangiti) and missionaries were sent not only to south India but also to Sri Lanka, Myanmar (Burma), and other countries to convert the people there. Brahmi inscriptions of the second and first centuries BC have been found in Sri Lanka.
Ashoka set a very high ideal for himself, and this was the ideal of paternal kingship. He repeatedly asked his officials to tell his subjects that the king looked upon them as his children. As agents of the king, the officials were also asked to take care of the people. Ashoka appointed dhammamahamatras to propagate dharma among various social groups, including women, and appointed rajukas for the administration of justice in his empire.
Ashoka disapproved of rituals, especially those observed by women. He forbade killing certain birds and animals, prohibited the slaughter of animals in the royal kitchen, and forbade the slaughter of animals in sacrifices. He banned gay social functions in which people indulged in an excess of revelry.
Ashoka’s dharma was not however a narrow dharma and cannot be regarded as a sectarian faith. His Kandahar Greek inscription preaches amity between the sects. Ashoka’s inscriptions are called dhammalipi, which cover not only religion and morality but also embrace social and administrative matters. They can be compared to the Dharmashastras or law-books written in Sanskrit under brahmanical influence. Though the dhammalipis were written in Prakrit under Buddhist influence, they try to regulate the social order like the Dharmashastras.
The Ashokan edicts can be also compared to the shasanas or royal edicts issued in Sanskrit by the brahmanized kings. The broad objective was to preserve the social order. He ordained that people should obey their parents, pay respect to the brahmanas and Buddhist monks, and show mercy to slaves and servants. Above all, the dhammalipi asks the people to show firm devotion (dridha bhakti) or loyalty to king. These instructions are found in both the Buddhist and brahmanical faiths.
Ashoka taught people to live and let live. He emphasized compassion towards animals and proper behaviour towards relatives. His teachings were meant to strengthen the institution of family and the existing social classes. He held that if the people behaved well they would go to heaven, but never said that they would attain nirvana, which was the goal of Buddhist teachings. Ashoka’s teachings were thus intended to maintain the existing social order on the basis of tolerance. He does not seem to have preached any sectarian faith.