The earliest mention of Prayag and the bathing pilgrimage is found in Rigveda Pari?i??a (supplement to the Rigveda).It is also mentioned in the Pali canons of Buddhism, such as in section 1.7 of Majjhima Nikaya, wherein the Buddha states that bathing in Payaga (Skt: Prayaga) cannot wash away cruel and evil deeds, rather the virtuous one should be pure in heart and fair in action.The Mahabharata mentions a bathing pilgrimage at Prayag as a means of pr?ya?citta (atonement, penance) for past mistakes and guilt.In Tirthayatra Parva, before the great war, the epic states "the one who observes firm [ethical] vows, having bathed at Prayaga during Magha, O best of the Bharatas, becomes spotless and reaches heaven."In Anushasana Parva, after the war, the epic elaborates this bathing pilgrimage as "geographical tirtha" that must be combined with Manasa-tirtha (tirtha of the heart) whereby one lives by values such as truth, charity, self-control, patience and others.
ther references to Prayaga and river-side festivals in ancient Indian texts, including at the places where present-day Kumbh Melas are held, but the exact age of the Kumbh Mela is uncertain. The 7th-century Buddhist Chinese traveller Xuanzang (Hiuen Tsang) mentions king Harsha and his capital of Prayag, which he states to be a sacred Hindu city with hundreds of "deva temples" and two Buddhist institutions. He also mentions the Hindu bathing rituals at the junction of the rivers.According to some scholars, this is the earliest surviving historical account of the Kumbh Mela, which took place in present-day Prayag in 644 CE
Some Tradition ascribes Kumbha Mela's origins to 8th ce philospher Shankara as a part of his efforts to start major Hindu gatherings for philosophical discussions and debates along with Hindu monasteries across the Indian subcontinent.