Udayin (c. 460-444 BCE) also known as Udayabhadra was a king of Magadha in ancient India. According to the Buddhist and Jain accounts, he was the son and successor of the Haryanka king Ajatashatru. Udayin laid the foundation of the city of Pataliputra at the confluence of two rivers, the Son and the Ganges. He shifted his capital from Rajgriha to Patliputra due to the latter's central location in the empire.

According to the Buddhist accounts, the successors of the Magadha ruler Bimbisara were Ajatashatru, Udayabhadda (Udayin), Anuruddha, Munda and Nagadasaka.[1] The Jain tradition also mentions Udayin as the son and successor of Ajatashatru.[2] However, the Puranas name the successors of Bimbisara as Ajatashatru, Darshaka, Udayin, Nandivardhana and Mahanandin.[1][3] The Matsya Purana names Vamsaka as the successor of Ajatashatru.[4] Since the Puranas were composed at a later date, the Buddhist tradition seems to be more reliable.[1] The Nagadasaka of the Buddhist chronicles is identified with the "Darshaka" of the Puranas.[5]

Professor H. C. Seth (1941) identified Udayin with the king Udayana mentioned in the Sanskrit play Svapnavasavadatta.[4] The Chinese traveler Xuanzang states that the last descendant of Bimbisara built a sangharama (monastery) at Tiladaka. Seth theorized that this last descendant was Darshaka, and Udayin established a new dynasty, as signified by his transfer of the empire's capital from Rajgriha to Pataliputra.[6] Liladhar B. Keny (1943) criticized Seth's theory as incorrect. According to him, the Udayana of Svapnavasavadatta was a different king, who ruled Vatsa kingdom with his capital at Kaushambi.[4]

R. G. Bhandarkar notes that the name of Darshaka (Dasaka) is prefixed with the word "Naga" in the Buddhist chronicles, which may signify his detachment to his successors and his attachment to the Nagas of Padmavati . This implies that he may be from a different family and had become the king approximately three generations after Ajatashatru, not immediately succeeding him.[7]

The Buddhist traditions state that Udayin was Ajatashatru's favourite son, and was alive during the reign of his grandfather Bimbisara. When Ajatashatru met Gautama Buddha, Udayin was a young prince.[5] Udayin ruled during c. 460-444 BC.[8] he established his capital at Pataliputra at the confluence of the Son and the Ganges rivers.[9] His father had built a fort here to repulse a potential Pradyota invasion from Avanti. Udayin moved his capital to Pataliputra, probably because it was at the centre of his growing kingdom.[2]

He defeated Palaka of Avanti multiple times but was ultimately killed by him in 444 BC.[10] The Puranas mention Nandivardhana as the successor of Udayin. However, the Sri Lankan Buddhist chronicles state that he was succeeded by Anuruddha. These Buddhist chronicles also state that all the kings from Ajatashatru to Nagadasaka, including Udayin, killed their fathers.[2] Jain texts mention that Uadyin was killed by an assassin of rival kingdom.[9] Being childless, he was succeeded by Nanda who was selected by his ministers.[9]