The Bodhisatta was once born in Mithilā as the son of Sirivaddhaka and Sumanādevi. The child was born with a medicinal plant in his hand, and was therefore called Mahosadha. He talked immediately after birth, and it is said that, on the day of his conception, Videha, king of Mithilā, dreamed a dream, which presaged the birth of a sage. From early childhood Mahosadha gave evidence of unusual ability, and one of his first acts was to build a large hall and lay out a garden with the help of his companions. The king wished to have him in the court though he was only seven years old, but was dissuaded by his wise men. But he sent a councillor to watch the boy and report of his doings from time to time. When the king was fully convinced (the Jātaka gives an account of nineteen problems solved by Mahosadha) that Mahosadha was undoubtedly endowed with unusual wisdom, he sent for him in spite of the counsel of his ministers - Senaka, Pukkusa, Kāvīnda and Devinda - and appointed him as his fifth councillor. One day, Mahosadha saved the queen Udumbarā (q.v.) from the unjust wrath of the king, and ever after she was his firm and loyal friend. After his entry into the court, Mahosadha was on many occasions called upon to match his wit against that of the senior councillors, and on each occasion he emerged triumphant. E.g., in the Mendakapañha (q.v.) and the Sirimandapañha (q.v.).
When aged sixteen he married Amarādevī. She was a wise woman, and frustrated many attempts of Mahosadha's enemies to embroil him with the king. Once they stole various things from the palace and sent them to her. She accepted them, and made assignations with each of the donors. When they arrived she had them seized, their heads shaved, and themselves thrown into the jakes, where she tormented them, and then arraigned them before the king with the stolen goods. Mahosadha, aware of the plots against him, lay in hiding, and the deity of the king's parasol put several questions to the king, knowing that none but Mahosadha could answer them. The king sent men to seek him, and he was discovered working for a potter. The king showed him all honour, and obtained from him the answers to the deity's questions.
But his enemies continued to plot against him, until orders were given by the king that he should be killed the next day. Udumbarā, discovered this and warned him. But in the meantime he had discovered the guilty secrets of his enemies: Senaka had killed a courtesan, Pukkusa had a leprous spot on his thigh, Kāvinda was possessed by a yakkha named Naradeva, and Devinda had stolen the king's most precious gem. Mahosadha posted these facts everywhere in the city, and the next day went boldly into the palace. The king professed innocence of any evil intentions against him; but Mahosadha exposed the schemes of them all, and Senaka and the others were only saved from severe punishment by the intervention of Mahosadha himself. Thenceforward Mahosadha was Videha's trusted councillor, and took various measures to increase his royal master's power and glory. Spies were sent to every court, whence they brought home reports. Mahosadha also had a parrot whom he employed to ferret out the most baffling secrets. While returning from a visit to Sankhapala, king of Ekabala, the parrot passed through Uttarapañcāla and there overheard a conversation between Cūlani Brahmadatta, king of Kampilla, and his purohita Kevatta, wherein the latter unfolded a scheme for capturing the whole of Jambudīpa. Kevatta was too wise to allow Brahmadatta, to attack Mithilā, knowing of Mahosadha's power, but Mahosadha deliberately provoked Brahmadatta by sending his men to upset a feast he had prepared, during which he had planned to poison the hundred princes whom he had brought under subjection. Brahmadatta then set out to attack Mithilā. He laid siege to the city, and adopted various ways of compelling the citizens to surrender. But Mahosadha was more than a match for him, and found means of defeating all his plans. In the end Mahosadha engaged the services of Anukevatta, who, pretending to be a traitor to Mithilā, went over to the army of Brahmadatta and, gaining the king's confidence, informed him that Kevatta and all the other counsellors of Brahmadatta had accepted bribes from Mahosadha. The king listened to him, and on his advice raised the siege and fled to his own city.
But Kevatta planned revenge, and, a year later, he persuaded Brahmadatta to send poets to Videha's city, singing songs of the peerless beauty of the daughter of Brahmadatta, Pañcālacandī. Videha heard the songs and sent a proposal of marriage, and Kevatta came to Mithilā to arrange the day. Videha suggested that Kevatta should meet Mahosadha to discuss the plans, but Mahosadha feigned illness, and when Kevatta arrived at his house, he was grossly insulted by Mahosadha's men. When Kevatta had left, Videha consulted Mahosadha, but would not be dissuaded from his plan to marry Pañcālacandī. Finding that he could do nothing with the king, Mahosadha sent his parrot Matthara to find out what he could from the maynah bird which lived in Brahmadatta's bedchamber. Matthara used all his wits and won the favour of the maynah and learnt from her of Kevatta's plan, which he repeated to Mahosadha.
With Videha's leave, Mahosadha went on Uttarapañcāla to, as he said, make preparations for the wedding. But he gave orders for a village to be built on every league of ground along the road, and gave instructions to the shipwright, Anandakumāra, to build and hold ready three hundred ships. At Uttarapañcāla he was received with great honour, and obtained the king's permission to build in the city a palace for Videha. The king gave him a free hand, and be immediately started to threaten to pull down houses belonging to various people, from the queen mother downwards, and obtained money from them as bribes to spare their houses. Having reported to the king that no suitable spot was available within the city, he obtained his consent to erect a palace outside the city, between that and the Ganges. All access was forbidden to the site on penalty of a large sum, and having first erected a village called Gaggali for his workmen, elephants, etc., Mahosadha started to dig a tunnel, the mouth of which was in the Ganges. The tunnel, a marvellous place, was duly constructed, fitted with all manner of machinery, and beautifully decorated. A smaller tunnel was dug, leading into the larger, one opening, which was, however, concealed, giving access to the king's palace. The task occupied four months, and when all preparations were complete, Mahosadha sent word to Videha.
Videha arrived at Brahmadatta's court, and a great feast was held in his honour at Upakārī, the palace which had been prepared for his residence. While the feast was in progress, Mahosadha sent men by the smaller tunnel to the palace and bade them fetch Talatā (the queen mother), the queen Nandā, and Pañcālacandī, on the pretext that they had been sent for by Brahmadatta to take part in the festivities as Videha and Mahosadha had both been killed, according to plan. Meanwhile Brahmadatta had given orders that the whole city should be surrounded. Videha was overcome with fright on discovering what was happening, but he put himself into Mahosadha's hands. The latter led him into the large tunnel, and there he was brought face to face with the members of Brahmadatta's family, who had already been conducted thither. Pañcālacandī was placed upon a heap of treasure and married to Videha. On emerging from the tunnel, they were placed on board a waiting ship, with Tālatā and Nandā, and sent away into safety, escorted by the other ships, Mahosadha himself remaining behind in Uttarapañcāla.
The next day, Brahmadatta came with his army to Upakāri, hoping to capture Videha. There Mahosadha revealed to him what had happened, and, in due course, persuaded him to forget his wrath and inspect the tunnel. While in the tunnel Brahmadatta expressed his remorse for having listened to the evil advice of Brahmadatta, and he and Mahosadha swore eternal friendship. Mahosadha returned to Mithilā, taking with him Brahmadatta's dowry for his daughter; the members of Brahmadatta's family returned to Uttarapañcāla, and the two kings lived in great amity.
Videha died ten years later, and in fulfilment of a promise made to Brahmadatta, Mahosadha went to Uttarapañcāla. There Nandā, who had never forgiven him, tried to poison the king's mind against him; but this plot was frustrated by a religious woman, Bherī (q.v.), and Brahmadatta remained his firm friend, loving him, as he confessed to Bheri, more than any of his own family.
The Jātaka was related to illustrate the Buddha's great wisdom.
The story occupies J.iv., pp. 329 478, in Fausböll's edition; what is given here is merely an extremely short summary; cp. Mtu.ii.83 9.