The Rakshas king Ravana was worshiping Lord Shiva very strongly. Once he has created Shiv Stotram for Lord Shiva.
What was the story behind creating Shiv Stotram?
Ravana is a symbol of ego. Ravana had ego for his power, so he went to pick up the whole Kailash mountain on which God Shiva meditates. To achieve this purpose he asked his brother Kubera for Pushpak plane. He traveled towards Himalaya and stopped at the entrance of Kailash to pick it. Nandi found him and asked him to stop. He abused Nandi that Nandi is animal and Nandi cursed him that
The day when one animal (Monkey Hanuman) will burn your golden Lanka, that day oh Ravana, understand that you are no more and you have reached your end.
Ravana continued by ignoring Nandi and started to lift Kailash. Lord Shiva opened his eyes from meditation and put his toe on the ground, Ravana's hands got stuck! Till Shiva's toe was touched to the surface, the whole mountain could not be moved.
Ravan yells for Shiva to free his hands by creating
Shiva Tandava Strotram, and Shiva frees him and leaves him in peace because Ravana cried a lot.
Reference - Read full Story in Ramayana narrated in Uttara Kanda of Valmiki Ramayana
Also read Ravan Samhita!
14.1: This Greatest of the Great Stava (Hymn) has been Uttered; those who Regularly...
14.2: ... Recite it and Contemplate on Shiva with Purity of Mind and in an Uninterrupted manner and ...
14.3: ... with Great Devotion in Hara, the Guru, will Quickly Advance towards Him; there is No other Way or Refuge,
14.4: The Delusion of that Person will be Destroyed by Deep Contemplation (Meditation) on Shankara.
15.1: During the Time of Completion of the Puja, those who Recite this Song of the Ten-Headed Ravana, ...
15.2: ... Recite this after Completing the Puja of Shambhu in the Evening,...
15.3: ... To him who is Steadfast in this Worship; will come Chariots Yoked with King of Elephants and Horses (signifying Prosperity) ...
15.4: ... and Devi Lakshmi will Always show Her Graceful Face to him; Sri Shambhu will Bestow this Boon.
Ravana asked with folded hands:
When will I be happy, living in the hollow place near the celestial river, Ganga, carrying the folded hands on my head all the time, with my bad thinking washed away, and uttering the mantra of Lord Shiva and devoted in the God with glorious forehead with vibrating eyes