Once the king of Magadha, at constant war with the king of Anga, obtaining the help of the Nāga-king who dwelt in the river Campā, defeated his rival. Thereafter he held an annual festival in honour of the Nāga-king. The Bodhisatta, a very poor man, saw Campeyya's splendour on his way to the feast and longed for a like greatness. As a result, after death, he was born in the Nāga world where he became king under the name of Campeyya. Realising what had happened, he felt disgust at his position as a Nāga and made many attempts to observe religious vows, hoping, in this way, to gain release. But he was foiled in his efforts by his consort Sumanā. At last he came to the world of men, where he kept fast on certain days, lying on an ant-hill. There he was taken captive by a snake charmer who tortured him in various ways and took him about, exhibiting him for gain. By certain tokens of which Campeyya had earlier warned her, Sumanā knew that her husband had been taken captive and, after much searching, she discovered him just as the snake charmer was about to give a performance before Uggasena, king of Benares. The whole story was then revealed, and the snake charmer set Campeyya free. That Uggasena might be convinced of the truth of the story, he was invited to the Nāga-world, where he and his retinue were lavishly entertained.
The story was related in connection with the observance of uposatha vows. Devadatta was the snake charmer and Sāriputta was Uggasena. Rāhulamātā was Sumanā (J.iv.454-68).
The Campeyya-cariyā is included in the Cariyāpitaka (p.85f ) in order to illustrate sīla-pāramitā.
This Jātaka is often referred to (E.g., J.i.45; MA.ii.617) as one of the births in which the Bodhisatta practised sīla to perfection.