The Brahmi writing system was being used in the Indian subcontinent in the third century BCE. It was probably created through the efforts of Emperor Ashoka of Mauryan Dynasty who ruled from 268 to 232 BCE. He was the first emperor to rule over almost the entire South Asia—a densely populated area as large as Western Europe, stretching from present-day Afghanistan in the west to Bangladesh in the east, and covering much of central India. He ruled primarily from Pataliputra (in present day Patna), but he had provincial capitals in Taxila (in present day Pakistan) and Ujjain (in Madhya Pradesh).
Ashoka’s rock edicts, which can be found in modern-day Pakistan and India, were written in Brahmi script. The Brahmi script has influenced the Sanskrit-based languages currently being used in North India, and the four Dravidian languages being used in South India. The languages in Southeast Asia are also influenced by Brahmi. Over the centuries, these languages have evolved and now their connection to a common Brahmi root is not easy to detect. The Brahmi script was deciphered in the 1830s by James Prinsep.
There are a number of theories about the origin of the Brahmi script. Some scholars have suggested that the Brahmi script was developed from the Semitic script via Aramaic. There are other scholars who insist that the Brahmi script comes from Indian sources. Several attempts have been made to connect the Brahmi script with the Indus script, but the connection between the two writing systems is not clear, since the Indus script remains undeciphered.
The theory that I find plausible is that the Brahmi script was created on Ashoka’s initiative. He commanded his officials to create a writing system based on the existing sources. To fulfill his order, his officials used the system of record keeping then used by Indian merchants to develop the Brahmi script. The sounds in Brahmi script match the sounds of Pali and other popular Indic languages which are founded on Sanskrit. Pali is the language in which Buddha has preached. A number of Ashoka’s rock inscriptions are in Pali.