Puranas and ethics shows us how to live and what to eleminate from usWe should not possess ego in us on any circumstances and situations. To make ourselves getting reformed only the vedas, puranas and ethics of Hindu religion and even in other religions stressed through some stories. When we possess ego in us this will kill us as a slow poison. To remove the ego from us there are indications given by the God or supreme power through other human beings and we should understand the indications.
Shiv purana told this point. Nandi Deva was the Personal attendant to Lord Shiva. He possess a good ego in himself as he was near Lord Shiva. To remove his ego and letting him to have courtesy of respecting others, Lord shiva planned and Called him. Lord Shiva gave him a flower and asked to handover the same to Lord Mahavishnu before its fading. Nandi Deva also took the flower and proceeded towards the Srivaikundam, where Lord Vishnu dwells. On the entrance Dwarapalakas were standing but Nandi as he possess a good ego as he is coming from Lord Shiva, start moving inside without asking permission from them or at least informing them. They prevents Nandi deva to get entered as to get permission from them.They told him,"You have cursed Ravana, the King when he entered Kailaya without your permission once, but you yourself violating the rules." Nandi Deva replied them as,"It is needless to get permission from you, as I am closely associated with Lord Shiva and further more I am the leader of Bootha Ganas". On hearing their argument, Lord Mahavishnu, asked the Dwarapalakas to send the Nandi deva inside. Nandi went inside, gave the flower offered by Lord Shiva and came out. But the Dwarapalakas cursed him for his mistake as to get alarming heat over his whole body and getting suffered. By hearing this, Nandi laughed more and proceeded to Kailaya. But soon after he came out of the SriVaikundam, he felt his whole body got heated and the heat start increased. Without tolerating the heat, Nandi ran to Lord Shiva and told for rescue. Lord Shiva replied him as this was a punishment to his (Nandi) ego and advised Nandi that he should have respected the dwarapalakas without insulting them as gate keepers. Further Lord Shiva told him He was helpless and he should move to earth for penance towards Lord Mahavishnu for his rescue from such curse. Accordingly, Nandi got human birth and went to earth and reached one Tank (pushkarani) and Temple of Lord Mahavishnu. There he settled himself and did his penance towards Lord Vishnu. On his strong penance, Lord Maha vishnu pleased and removed his curse.
This may be considered as story but one should realize that possessing ego in one will take him /her to any extent is the lesson and there is no escape from the penalty.