The demons were torturing the devtas severely. When they could bear it no longer, they sought help from Lord Vishnu.
Lord Vishnu said to them, “I do not have enough power to defeat or destroy the demons. I must seek help from Lord Shiva, the most compassionate one.”
So Lord Vishnu started worshipping the Lord. This he did for a very long time. For years and years, Lord Vishnu meditated upon Lord Shiva and chanted His name. This went on for such a long time, yet still Shiva remained unmoved. The devtas continued to be mercilessly tortured by the demons.
Lord Vishnu then decided to intensify his worship. He decided to offer one thousand lotus flowers to Shiva while chanting His one thousand names.
After making all his preparations, Vishnuji began to worship Shiva most devotedly. One by one, he offered the lotus flowers and chanted Shiva’s name. When he came to the end, he realized that one flower was missing. He had only counted 999. That meant he had to leave and find one more lotus. Instead of doing that, he immediately thought of plucking out one of his eyes and placing it before Shiva.
As He was just about to do this, Lord Shiva appeared before Him and said, “ Vishnu, I will grant you your wish.”
“Please give me something that will help me to conquer the demons,” said Vishnu.
Shivaji replied, “I give you this chakra(discus). It will help you to conquer all your enemies. No matter how many demons come to attack you, you will be able to defeat them all.”
On receiving the chakra, Lord Vishnu went on to defeat the demons and save the devtas.