The Haryanka dynasty is believed to have been the second ruling dynasty of Magadha, an empire of ancient India, which succeeded the mythological Barhadratha dynasty. Initially, the capital was Rajagriha. Later, it was shifted to Pataliputra, near the present-day Patna in India during the reign of Udayin. Thus Bimbisara is considered as the main founder of the dynasty.
The governance structure of Haryanka dynasty is mentioned in Buddhist texts. They mention gramakas (village headmen) who headed village assemblies and mahamatras (high-ranking officials) who had executive, judicial and military functions.
Bimbisara reigned from 545-493 BCE. The extent of his kingdom is mentioned in Mahavagga. His advisors included Sona Kolivisa, Sumana (flower gatherer), Koliya (minister), Kumbhaghosaka (treasurer) and Jīvaka (physician). He was given the title of Seniya.
Both Jain and Buddhist texts claim the king was a follower of their respective religions. Uttaradhyayana Sutra says he was a follower of Mahavira, whereas Sutta Nipata depicts him and his wife, Khema, as followers of Buddha. The latter further mentions he deputed Jīvaka to assist Buddha's Sangha. He also married Chellana and Kosala Devi, sister of Pasenadi.
According to George Turnour and N.L. Dey, the name of the father of Bimbisara was Bhatiya or Bhattiya, but the Puranas refer him as Hemajit, Kshemajit, Kshetroja or Ksetrauja and the Tibetan texts mention him as Mahapadma.
In some sources, Bimbisara was imprisoned and killed by his son and successor, Ajatashatru, under whose rule the dynasty reached its largest extent. Ajatashatru was contemporary with Mahavira (599–527 BCE) and Gautama Buddha (563–483 BCE). Ajatashatru fought a war against Vajji, ruled by the Lichhavis, and conquered the republic of Vaisali.
Udayin or Udayabhadra is mentioned in Buddhist and Jain texts as the successor of Ajatashatru. Puranas however mention him as the fourth king after Darshaka.