Lord Shiva's devotion to Lord Rama is so complete and unique. When Lord Vishnu incarnated as Rama on the planet, Lord Shiva took the form of Lord Hanuman as a monkey to server his master. Hanuman is the monkey deity renowned for his courage, power and faithful, selfless service. The world has not yet seen and will not see in future also a mighty hero like Sri Hanuman.
When Lord Shiva decided to incarnate on Earth to serve his master, the question arose, “What would be the perfect form to serve with love and devotion? It is contrary to the dharma or responsibility of seva to take a human form like the Lord’s.” On this basis, he decided to take the lower form of a monkey, to keeping his master above himself. He felt a monkey doesn't need cooked food or meat, he doesn't need a home or bed or ornaments. He can adapt to any condition. Such was Shiva’s love and devotion.
Lord Hanuman is an avatar of Lord Shiva. Hanuman Ji is mentioned as an avatar of Shiva or Rudra in the Sanskrit texts like the Mahabhagvata Purana, the Skanda Purana, the Brhaddharma Purana and the Mahanataka among others. The 17th century Odia work Rasavinoda by Dinakrishnadasa goes on to mention that the three gods Brahma, Vishnu and Shiva combined to take to the form of Lord Hanuman.
The cosmic egg of creation, the power of creation, is firmly established in Hanuman’s body of pure love. He personifies the elegance of Lord Vishnu and Shiva. He has the destructive power of Rudra (Shiva). He is the force of prana and is completely detached, with the supreme intelligence of his mother.