Indradyumna's story was narrated by Rishi Markandeya to the Pandavas. It appears in the 199th chapter of the Vana Parva of Mahabharata.
Rishi Markandeya visited the Pandavas while they were in exile at Kamyaka-vana. He told the Pandavas and others with them many Vedic principles and also legends from the history of Bharata Varsha.
They asked the Rishi: We know that you are a chiranjeevi (immortal). Is there anyone older than you?
As the answer to this question, Markandeya narrated the story of Indradyumna to them.
Indradyumna was a Rajarshi, a king who observed tapas and attained the status of a Rishi. On account of his good deeds on earth, he was given a place in Swargaloka.
But one day, Indradyumna was told that his stay in Swargaloka was over. He has to go back to earth. The punya acquired through good deeds on earth gets exhausted as someone goes on enjoying the comforts of Swargaloka. Indradyumna's punya was apparently exhausted.
But how do you make out this?
When people on earth no longer remember the good deeds that someone has done and stop talking about them, it means that his punya is exhausted. Then, he has to come out of Swargaloka.
This applies to Naraka as well. If someone goes to Naraka on account of the evil deeds he has done, he has to suffer there as long as people continue to talk about them.
After coming back to earth, Indradyumna went to Rishi Markandeya.
Indradyumna: Lord, do you remember me?
Markandeya being a chiranjeevi, must have been alive when Indradyumna was a king on earth. It is with this hope that Indradyumna went to him.
Markandeya: We Rishis don't stay at one place for more than a night. We keep traveling from place to place. Since we are always busy doing vratas, upavasas, and yajnas, we don't get time to get involved in worldly matters. I don't think I remember you.
Indradyumna: Is there anyone who was born even before you? He might remember me.
Markandeya: There is an owl in the Himalayas. His name is Pravarakarna ( प्रावारकर्णः ). He is older than me. He might remember you.
Indradyumna then turned himself into a horse and carried the Rishi to the Himalayas.
Indradyumna asked the owl: Do you remember me?
The owl thought for two hours and said: No, I don't.
Indradyumna: Is there anyone older than you?
The owl: There is a lake by the name Indradyumna Sarovar. A crane called Nadijangha ( नाडीजङ्घः ) lives there. He is older than me.
Indradyumna, Markandeya, and the owl went to the lake.
There, they asked the crane: Have you heard about a king called Indradyumna?
The crane also said that he didn't remember him but he said: There is a tortoise who lives in this lake. His name is Akupara ( अकूपारः ). He is older than me. Let's ask him.
The crane called out to the tortoise.
Akupara came out.
They asked him: Do you know a king called Indradyumna?
Akupara thought for two hours. Tears welled up in his eyes.
He looked at Indradyumna with folded hands and said: How can I forget you? You are the great King Indradyumna who has performed a thousand yagas. You have given away so many cows as danam that this lake was formed from the footprints they made as they walked past. That's why this lake is named after you.
Since he was still remembered on earth, Indradyumna deserved a place in Swargaloka. The tortoise was also an immortal. So, Inradyumna can be in Swargaloka forever. A vimana arrived from Swargaloka and took him back.
But before going to Swargaloka, Indradyumna made it a point to drop back the Rishi and the owl from where he had picked them up. Otherwise, it would have been ingratitude.
This story from Mahabharata tells us how important it is to keep on doing good deeds in life. Our condition after death is entirely dependent on how well we live our life now.
Glory of Venkatesha
Story of Sri Yantra