Devraj Indr is the mightiest of the Devas who fought valiantly with demons like Vrita and many more and guarded the Swarglok. Just as the moon has spots in him, Devraj Indr for all his might and power was overshadowed with pride and it always needed a divine intervention to set him back on his true path. It was one such time when Bhagwan Shiv taught Devraj Indr a small lesson on being humble.
Once, after the great victory with Vrita, the demon, Devraj felt a sense of pride for his achievements. Although he was bestowed with the kingship over the Devas, he felt that it was not enough for his accomplishments and called in the divine architect Vishwakarma and asked him to build a bigger palace for him. Vishwakarma compiled and built him a huge palace. But Devraj Indr was not satisfied and asked for an even bigger place. When Viswakarma built another palace, Devraj Indr still was not happy and asked for another one.
Vishwakarma understood that Devraj Indr was not going to be satisfied and what was needed was a lesson to bring down his pride. He went to Brahma Ji and asked him for a solution. Brahma Ji understood that Devraj Indr needed to be taught a lesson, called in for Bhagwan Shiv mentioned the same to him. Bhagwan Shiv decided to bring down the pride of Devraj Indr and proceeded to Swargalok.
Bhagwan Shiv took the form of a young boy and stood outside Swarglok. Devraj Indr saw him and asked him as to who was he. The young boy asked as to whose was this palace and Devraj Indr answered with pride that it was his and also that he wanted to have bigger one and make it much more luxurious. The young boy answered calmly that he had seen palaces even more bigger built by other Indras. Devraj Indr is surprised at this answer. He hides it and asks how could there be different Indras, while he was there to rule Swarglok.
The young boy laughs and says that no post, especially that of Indr Dev was permanent and they changed with every Yuga, just as a new Brahma was born. Then, the boy shows a small group of ants which were going in a line and tells to Devraj Indr that those ants were the previous Indras who ruled the Swarglok. Once their time was over, they were reborn as the tiniest creatures on Earth and taking different births slowly rose to the kingship of Swarglok.
Devraj Indr understands how much it takes to achieve a great post with responsibility and be worth of it. He understands that even the mightiest of all rise to power from the lowest ranks. Devraj Indr realises that his kingship of Swarglok was a post of upholding Dharma and not a post of pride and arrogance. He falls at the feet of Bhagwan Shiv and asks for forgiveness. He mentions to Bhagwan Shiv that it was important of him to be free of all qualities which would make him egoistic and requests Bhagwan Shiv to grant him an opportunity to repent his sins through severe penance.
Bhagwan Shiv agrees for the same and blesses Devraj Indr, who was a changed person. Devraj Indr did penance for a thousand years and washed away his pride and came back to Swarglok as the true king of the Devas with all humility.