Once the Bodhisatta was born as the son of the king of Mithilā, in the Videha country. He was a rebirth of Makhādeva, who came down among men from the Brahma world in order to bring the number of his family, who renounced the world, up to eighty four thousand. And because the boy was born to round off the family, like the hoop of a chariot, he was called Nemi ("hoop").
On his father's renunciation, he came to the throne and engaged himself and all his subjects in righteousness and generosity. Once, when doubt arose in his mind as to which was more fruitful - holy life or giving alms - Sakka himself appeared before him to answer and encourage him. His fame spread to Tāvatimsa, and when the gods desired to see him, Sakka sent his chariot, with Mātali, to fetch him. On the way to Tāvatimsa, Mātali showed the king various hells and heavens and the palaces of various gods and goddesses. Arriving at the Sudhammā Hall, Nimi discoursed to the assembled gods. After staying in Tāvatimsa for seven clays, he returned to Mithilā to tell his subjects what he had seen.
When, later, his barber told him of the appearance of the first white hair on his head, he, like all his predecessors, handed over the throne to his son and became an ascetic. His son, Kālārajanaka, was the last of the eighty four thousand kings of Makhādeva's dynasty.
The story was told by the Buddha when he visited Mithilā. He smiled when he came to the site of Makhādeva's palace, and when asked why he smiled he related the Jātaka.
Anuruddha is identified with Sakka and Ananda with Mātali (J.vi.95 129).
This story forms the basis of the Makhādeva Sutta and is included in the Cariyapitaka.
M.ii.74ff.; in Dpv. (iii. 35) the king is called Nemiya.
Cyp.i.6; CypA.42ff.