This line is often used as a proverb, especially when someone does not listen to advice and invites trouble for himself. Literally, it means that when a person is destined to suffer, he acts in a strange manner, does not use his intellect or wisdom, and does not listen to the advice of well-wishers or of knowledgeable persons. The full text is like this:
न भूतपूर्वो न च के न दृष्टो । हेम्न: कु रंगो न कदापि वार्ता ।
तथापि तृष्णा रघुनंदनस्य । विनाशकाले विपरीतबुद्धि: ॥
There is another slightly different version of this shloka —
असंभवं हेममृगस्य जन्म । तथापि रामो लुलुभे मृगाय ।
प्राय: समापन्न विपत्तिकाले । धियोsपि पुंसां मलिनीभवन्ति ॥
Readers may be aware of the story from Ramayana. When Shree Ram,Seeta and Laxman were in exile, Marich (the demon and Ravana’s maternal uncle) came in the guise of a golden deer near Ram’s hermitage.