When the fire-sacrifice of Daksha Prajapati was destroyed, then Yagyadeva (the presiding deity of fire-sacrifice) ran away in the form of a deer. Lord Shankar grabbed that deer in the guise of a hunter, therefore he is called as Mrigapaani.
According to Kurma-Purana and Skanda-Purana, when Lord turned Vishnu as his wife and entered in the pinewood forest and fascinated the saints and sages there by their various sports, then sages felt it very nasty and they tried to drive away The Lord. They had send the animals like lions, snakes and deer etc. to threaten The Lord. But Lord made them as an ornament for the self. He caught the Veda in his left hand, who came there in the form of deer. He wanted to show that how Vedas can deny his personality, while Vedas are a means to approach him? Mahadeva laughed at the folly of the sages, that they are regularly reciting the Vedas, still they are not able to recognize me. Without surrendering to a bonafide and self-realized Guru, One can not know Shiva just by Vedic recitation. This notion is expressed here by Bhaskar Roy—
दारुवनस्थैस्त्वयाभिचरद्भिः प्रेषित एणो वेदशरीरः।
याचनमुद्रा वा तव हस्ते तत्प्रथितोऽसि त्वं मृगपाणिः॥
Maheshwar is called as Mrigapaani for keeping a pot in hand for begging alms. Philosophers perceive the mind as a deer. The deer-like mind of the devotees is captured by the music of transcendental words of Shiva, thus Lord Shiva, who is master of our mind, is called Mrigapaani. Inclination for attachment and envy is the ‘Mrigapa’ and Lord Kameshwar is named as Mrigapaani because he pierces into ‘Mrigapa’ of attachment and envy by an ‘Ani’, that means a needle. Controlling the mind by the process of constant practice and detachment is the true sense of worship of Mrigapaani.