The story of Vatapi is written in Vanaparva.
Vaisampayana said, "After this the royal son of Kunti who was ever distinguished for his profuse gifts unto Brahmanas, proceeded to the asylum of Agastya and took up his abode in Durjaya. It was here that that foremost of speakers, king Yudhishthira asked Lomasa as to why Agastya had slain Vatapi there. And the king also enquired after the extent of that man-destroying Daitya's prowess, and the reason also of the illustrious Agastya's wrath being excited against that Asura.
"Thus questioned, Lomasa said, 'O son of Kuru race, there was in the city called Manimati, in days of yore, a Daitya named Ilwala, whose younger brother was Vatapi. One day that son of Diti addressed the Brahmana endued with ascetic merit, saying, 'O holy one, grant me a son equal unto Indra.' The Brahmana, however, did not grant the Asura a son like Indra. And at this, the Asura was inflamed with wrath against the Brahmana. And from that day, O king, the Asura Ilwala became a destroyer of Brahmanas. And endued with power of illusion the angry Asura transformed his brother into a ram. And Vatapi also capable of assuming any form at will, would immediately assume the shape of a ram. And the flesh of that ram, after being properly dressed, was offered to Brahmanas as food. And after they had eaten of it, they were slain. For whomsoever Ilwala summoned with his voice, he would come back to Ilwala even if he had gone to the abode of Yama, in re-embodied form endued with life, and show himself to Ilwala. And so having transformed the Asura Vatapi into a ram and properly cooked his flesh and feeding Brahmanas therewith, he would summon Vatapi. And the mighty Asura Vatapi, that foe of Brahmanas, endued with great strength and power of illusion, hearing, O king, those sounds uttered with a loud voice by Ilwala, and ripping open the flanks of the Brahmana would come laughingly out, O lord of earth! And it was thus, O monarch, that the wicked-hearted Daitya Ilwala, having fed Brahmanas, frequently took away their lives.