Devapi belonged to the clan of Kurus and was the son of
Pratipa, king of the lunar race. As per Bhagavad Purana and Mahabharata, he was
the elder brother of Shantanu and Bahlika. Legend has it that when Shantanu
became the king of Hastinapura there was no rain for 12 years. This resulted in
a terrible famine.
People believed that the severe drought was the result of
younger brother (Shantanu) occupying the throne, when the elder brother (Devapi)
was still alive. As a solution to the drought, Shantanu then offered the
kingdom to Devapi. But he rejected it and instead agreed to be the chief priest
for conducting a yajna to invoke gods for rain. Devapi thus succeeded in bringing
rain to Hastinapura.
There are numerous reasons given as to why Devapi was
excluded from the throne. Brahadevata states that he suffered from a skin
disease.
Mahabharata states that Devapi was crippled and so the
people objected to him ascending the throne.
Bhagavad Purana states that when he was denied the throne,
he left for the forest and became an ascetic.
Another legend states that when there was drought in
Hastinapura, Devapi purposefully spoke against the Vedas that denied him the
throne. Thus Devas turned against Devapi and blessed the land with rain.