Asoka was treated as an out-caste by the Brahmins because he left his religion. Yet the simplicity of Buddhism attracted the masses and it continued to spread across India. Hinduism went in decline.
In 9th century, Shankracharya started to revive Hinduism by created religious sites and simplifying the rituals. Gradually, Buddhism was absorbed in Hinduism and Buddha was turned into a Hindu-god. This led to gradual disappearance of Buddhism in India while it continued to flourish outside India in China, Japan, Korea, Thailand.