Aśvapati (Aswapati) was the king of Kekaya. In ancient texts like Chāndogya Upaniṣad (Chandogya Upanishad) and Śatapatha Brāhmaṇa (Satapatha Brahmana), the name of Rājarṣi (Rajarshi; A king with the attributes of a seer) Aśvapati has been mentioned. In Chāndogya Upaniṣad, Maharṣi Uddālaka (Uddalaka) has cited the name of the Kekaya-king Aśvapati with much respect. He says, Aśvapati knows the Supreme Ātman (Atman), who is defined as Vaiśvānara (Vaiswanara), and whom the sages like Uddālaka himself wish to know–
tān hovācāśvapatirvai bhagavanto’yaṃ
kaikeya sampratī mamātmānaṃ vaiśvānaramadhyeti…
This is a clear evidence of Aśvapati’s sage-like wisdom.


According to Rāmāyaṇa (Ramayana), Aśvapati is the father of Yudhājit and Kaikeyī (Kaikeyi), the youngest wife of Daśaratha (Dasaratha). Bharata and Śatrughna (Satrughna), after their marriage, went to the Kekaya kingdom, along with their maternal uncle, Yudhājit. There, maternal grandfather Aśvapati greeted them with great affection. They stayed in the Kekaya kingdom, enjoying the affection of their grandfather and maternal uncle.
In the meantime, in Ayodhyā (Ayodhya), king Daśaratha decided to make his eldest son Rāma(Rama) the crown-prince. But Rājarṣi Aśvapati and Janaka were not invited to this ceremony. Daśaratha said, it would be enough to send them the good news afterwards. There was a reason behind such a strange decision. While marrying Kaikeyī, Daśaratha promised that Kaikeyī’s son would be entitled to ascend the throne after him. However, when this promise was made, Daśaratha was still without any son. Afterwards, when he had four sons, Rāma, born of the womb of Kauśalyā, was the eldest. So according to custom, he was entitled to ascend the throne. So Daśaratha feared that by performing Rāma’s corronation, his previous promise would be violated, and Rājarṣi(s) like Aśvapati and Janaka would not support this. So he avoided to invite them.


After the death of Daśaratha, Bharata and Śatrughna took leave from Aśvapati and went back to Ayodhyā. After that, there is no mention of him in Rāmāyaṇa. At the time of Rāma’s corronation, we see Yudhājit as the king of Kekaya. In the fourteen years in between, he passed away or went to Vānaprastha.