The Bodhisatta was once born as a pig and had a brother. They were adopted by an old woman of a village near Bārāṇasī and were called Mahātuṇḍila and Cūḷatuṇḍila.
The woman loved them like her own children and refused to sell them, but, one day, some lewd men made her drunk and she agreed to sell Cūḷatuṇḍila. When Cūḷatuṇḍila discovered this, he ran to his brother, but the latter taught him how it was the fate of pigs to be slaughtered for their flesh; he should, therefore, meet his death bravely. All Bārāṇasī heard the Bodhisatta’s teaching, and flocked to the spot. The king adopted the pigs as his sons and Mahātuṇḍila was appointed to the seat of judgment. On the king’s death, he wrote a book of law for the guidance of future generations.
The story was related in reference to a monk who was in constant terror of the thought of death. The monk was identified with Cūḷatuṇḍila (J.iii.286 ﬀ).
It is said (DhA.i.83) that the lewd men were identical with the Bhaddavaggiyā. Having heard Mahātuṇḍila teach the five precepts, they observed them for sixty thousand years, hence their attainment of Arahantship as in their last birth.
Mahātuṇḍila’s teaching is referred to as the Tuṇḍilovāda.