Lord Hanuman was the incarnation of Lord Shiva born to Anjana and Kesari. Anjana was actually an apsara who took birth as a female monkey (vanara) due to a curse. The only way of redemption from this curse was to give birth to an incarnation of Lord Shiva. Anjana and Kesari prayed intensely to Lord Shiva who was pleased to see the devotion and prayers of Anjana and Kesari. Lord Shiva granted them their boon by agreeing to be born as their child. Lord Hanuman is therefore also called by the name Maharudra since he was the incarnation of Lord Shiva whose other name was Rudra.