From REFLECTION R696The ancient University of Nalanda failed for 2 reasons.
Firstly, as it grew, it became more academic, learning for the sake of learning, instead of teaching and practising what the Buddha taught. It also became very large and rich. This attracted the Turk marauders who had been watching Buddhist monastic wealth for centuries before finally invading India 17 times between 1000 and 1027! Finally, they overran northern India.
Buddhism was effectively uprooted from northern India (bad karma?). Yet, the quietist vegetarian jains survived intact to this day. The main reason for this was and is that they have lay teachers who kept on teaching the Jaina Dharma in the privacy of their own homes. They protected their Dharma, their Dharma protected them.
http://themindingcentre.org/wp/