In Rāmāyaṇa (Ramayana), according to ādikavi (adikavi; the first poet, i.e., Vālmīki; Valmiki), Aja is the son of Nābhāga (Nabhaga)— nābhāgasya vabhūvājaḥ.
However, in most of the Pūraṇas (Purana), Aja is the son of Raghu of the Ikṣvāku (Ikshvaku) clan, and the father of Daśaratha (Dasharatha).
According to Matsyapūraṇa (Matsyapurana), Aja or Ajaka is the name of Dilīpa’s (Dilipa’s) son. Aja’s son is Dīrghabāhu (Dirghabahu), while his son is Ajapāla (Ajapala), and Ajapāla’s son is Daśaratha.
There is not much information in either Rāmāyaṇa or Purāṇas about the birth and the life of King Aja. However, no matter how the 4th century poet, Kālidāsa (Kalidasa), imagines the life of Aja to be, its connection to Pūraṇas is not baseless, therefore, his imaginary description might be considered authentic. Based on that it may be said that since King Raghu had a son on the brāhma-muhūrta (brahma-muhurta) or the last prahara (measure of time equal to three hours) of the night, his son Aja was named after Brahmā (Brahma)— ataḥ pitā brahmaṇa eva nāmnā/ tamātmajanmānam ajaṃ cakāra. According to Raghuvaṃśa (Raghuvamsa), Aja went to the town of Vidarbha for Indumatī’s (Indumati’s) svayaṃvara (swayamvara) to fulfil his father’s wishes. On his way to Vidarbha, while he was resting, exhausted by the heat of the sun, a wild elephant disturbed his sleep, and the elephant was killed upon his command. The moment the elephant died, it transformed into a gandharva full of spiritual lustre. The gandharva told them—once, in the past, he insulted an important person that is why he was transformed into a mad elephant. To be freed from the curse he had to meet Aja, — so was the intention of that magnanimous person. Out of gratefulness, upon being freed from the curse, the gandharva gave some infallible arrows to Aja, and said that after Indumatī’s svayaṃvara these arrows would come handy to him to be used to conquer over the irate kings. At the end of the svayaṃvara, after winning the battle, Aja returned to his capital with Indumatī. Raghu, after having Aja succeed the throne, left for vānaprastha (vanaprastha). After savouring the prosperous kingdom for a while, Indumatī gave birth to Daśaratha. One day, a garland fell from the divine sage Nārada’s (Narada’s) vīṇā (vina; lyre), on Indumatī, and she died. In Raghuvaṃśa, both Indumatī’s svayaṃvara and Aja’s lament after Indumatī’s death are portions which see the exquisite manifestation of the Kālidāsa’s poetic skill. In Rāmāyaṇa neither Aja’s journey for vānaprastha is mentioned nor does it say how Aja had Daśaratha succeed the throne. However, since Kālidāsa has given previous examples of the tendency of the clan of Raghu towards asceticism during old age, it may be assumed that Raghu became an ascetic after Daśaratha’s succession.