In Śāntiparva (Santiparva)of Mahābhārata (Mahabharata), while describing the greatness of the grandsire Bhīṣma, Yudhiṣṭhira mentions one Chakravartī (Chakravarti) king named Ugrāyudha (Ugrayudha). Ugrāyudha was defeated and slain by Bhīṣma (Bhishma). But in Mahābhārata, nothing more can be found about his lineage, and the reason of his enmity with Bhīṣma. However in other versions of Mahābhārata, Khila Harivaṃśa or in other Purāṇa(s), we gets details about him. Ugrāyudha was not only a Chakravartī king, rather, the history of his rise and fall was an important section in the political history of the Kuru and Pāñcāla(s).
According to Purāṇa (Purana; Mythological Scripture), Ugrāyudha was the son of Kṛta (Krita), in the genealogical lone of Yavīnāra (Yavinara), son of Dvimīḍha (Dwimidha)of Puruvaṃśa (Puruvamsa; the Puru dynasty). Harivaṃśa Purāṇa, however, mentions him as one of the sons of Ajamīḍha (Ajamidha). With his rise, a new dimension was added to the rivalry among relatives in the Puru dynasty.
The Pāñcāla(s)  (Panchala) emerged from the lineage of Nīla (Nila), son of King Ajamīḍha and his wife Nīlinī (Nilini). The grandfather of the Pāñcāla king Pṛṣata (Prishata)was defeated and killed in a battle with Ugrāyudha. Pṛṣata fled to the south — to the city of Kāmpilya (Kampilya). Ugrāyudha ascended the throne of Pāñcāla. At that time, Kāmpilya was the capital of the kings of Nīpa dynasty. Nīpa was a king belonging to the lineage of Vṛhadvasu, born of the womb of Dhūminī (Dhumini), another wife of AjamīḍhaWhen Pṛṣata came to take shelter in Kāmpilya, there was ruling Janamejaya Durvuddhi (the evil-minded Janamejaya), son of Bhallāṭa (Bhallata), the last king of the lineage of Nīpa. In Purāṇa, it is said that Ugrāyudha destroyed this Nīpavaṃśa because of this Janamejaya. In Mahābhārata, too, we get the mention of Janamejaya as proud king who used to uproot his own relatives. Perhaps Janamejaya was responsible for making the Nīpa dynasty weak. Having this opportunity, Ugrāyudha destroyed the Nīpa dynasty and occupied Kāmpilya. So in both kingdoms, his rule became supreme. According to Purāṇa, he had a son called Kṣema.

Sometimes after this, in the main line of the Puru dynasty, came a change. King Śāntanu passed away, leaving behind his two young sons, Citrāṅgada(Chitrangada) and Vicitravīrya (Vichitravirya),and his widow Satyavatī. Bhīṣma, the eldest son of Śāntanu (Santanu) and Gaṅgā (Ganga)was not entitled to ascend the throne, but at this moment of crisis , he took charge of the adminstration for the time being.In Harivaṃśa, Bhīṣma himself narrates — Śāntanu’s post-funeral rites were not yet complete then, and a messenger from Ugrāyudha visited Bhiṣma. He proposed that Satyavatī (Satyavati)should be given to him, for the good of Hastināpura (Hastinapura). Bhīṣma was annoyed, but as per the advice of brāhmaṇa(s) and ministers, he held the war postponed until the śrāddha of his father was complete.He also tried to convince him in reasonable terms,, but Ugrāyudha was adamant. Finally, Bhiṣma defeated and killed him in a battle; and the thrones of Pāñcāla and Kāmpilya became empty at the same time. Now Pṛṣata re-occupied both the kingdoms, and established his rule in both Uttara Pāñcāla and Dakṣina Pāñcāla.
Probably after this, there was a temporary gap in the rivalry between the Kuru and Pāñcala, which started since the time of Samvaraṇa, and the two powers became friendly for the time.
In Matsyapurāṇa, the legend of this Ugrāyudha has been described in a completely different way. Ugrāyudha is  described there as a tapovana (hermitage-grove)-dwelling Rājarṣi belonging to the Solar dynasty. There is a sense of miraculous novelty in the story of Matsyapurāṇa, but in comparison with the description in Mahābhārata and Purāṇa, it appears that the Matsyapurāṇa-version is not historically justified.