Bhrigu rishi incarnated himself as hunter under a name "rukshun" in a forest.
Birthplace is today's small city named anbil near trichy, tamilnadu)
Narada muni appeared before him and blessed him to chant rama mantra.
Hunter who is tamil origin, struggled to chant 'rama' as tamil by its original form don't have words starts with "r". (Even now tamil scholars say ram as erama, ravanan as eravanan)
Understanding the challenge the hunter facing, narada asked "what is this?" by showing a tree.
He replied "mara". (Mara is tamil language)
Narada smiled and asked him to chant "mara mara mara".
Hunter continued chanting "mara mara mara" which became "rama rama rama.."
With the blessing of Narada, by continuously chanting "rama rama.." for years, brahma appeared and called him "valmiki".
Hunter became a muni.
Brahma asked to write a detailed story of Rama as it is, who is live at present and who himself is the avatar of Vishnu.
Immediately, his wife saraswathi appeared and blessed him to become a great poetry writer.
Valmiki movies to region near thamasa river.
Valmiki who is a muni didn't had any love or hate in this materialistic world.
But, suddenly he felt attracted by seeing the nature beauty.
His heart became poetic and felt so enchanted looking at the world..
Valmiki himself was surprised to see these changes inside him.
But he did knew that he is getting prepared to write Epic Ramayana.
One day, while valmiki was roaming around the forest, he saw pair of birds happily playing with each other..
Valmiki was looking at these birds happily.
Suddenly a hunter nearby throwed an arrow and killed the male bird...
The female bird seeing his partner bird getting killed, shouted, jumped and cried...
This incident extremely disturbed valmiki and he got angry on that hunter...
Immediately, he cursed him by saying
मा निषाद प्रतिष्ठांत्वम्
अगमः शाश्वतीं समाः |
यत् क्रौञ्च मिथुनात् एकम्
अवधीः काम मोहितम् ||
- वाल्मीकि रामायण
The meaning of above sloka, as understood by valmiki himself is..
Hey Hunter (निषाद)! By killing (अवधीः) one of this paired birds (यत् क्रौञ्चमिथुनात् एकम्), who were immersed in love (काम मोहितम्), you will not attain (मा अगमः) everlasting (शाश्वतीं समाः) divine sanctity (प्रतिष्ठांत्वम्)
After cursing that hunter, valmiki reached his ashram.
He felt bad about himself as he could not control his anger.
Also,
he felt surprised on how with so much anger mindset, he cursed that hunter in poetry form instead as prose form?
By knowing that he is going to write story of rama, he felt extremely worried, that his 1st sloka unfortunately came as a curse.
He felt disturbed at one side, and felt excited to see such a beautiful poem came out of his mouth.
He felt, it is a blessing of narada, brahma and saraswathi.
To clarify his doubts brahma appeared again in front of valmiki.
Valmiki explained the incident and also the sloka which came out from his mouth as curse.
Brahma said,
"Valmiki! The sloka you have recited looks like a curse for you.. but it is a perfect alika to start to write this epic story of rama.
I will explain the actual meaning of this sloka..
You have recited sloka as:
मा निषाद प्रतिष्ठांत्वम् अगमः शाश्वतीं समाः |
यत् क्रौञ्च मिथुनात् एकम् अवधीः काम मोहितम् ||
- वाल्मीकि रामायण
But, while understanding its meaning, you have connected 1st word "मा" with "अगमः".
That is,
निषाद प्रतिष्ठांत्वम् मा अगमः शाश्वतीं समाः |
यत् क्रौञ्चमिथुनात् एकम् अवधीः काम मोहितम् ||
- वाल्मीकि रामायण
It is ok to shift words and connect with other words in sanskrit... But it is not required to connect "मा" with "अगमः" here.
Meaning can be understood directly by reading मा निषाद alone.
मा means mahalakshmi (other meaning is 'not')
निषाद means stay//reside/keep (other meaning is hunter)
क्रौञ्च means raakshas (other meaning is bird)
Here is your sloka meaning.
Hey Vishnu who keeps Mahalakshmi in his heart (मा निषाद)! By killing (अवधीः) a raakshas (यत् क्रौञ्चमिथुनात् एकम्) who was immersed in love (काम मोहितम्), you will attain (मा अगमः) everlasting (शाश्वतीं समाः) divine sanctity (प्रतिष्ठांत्वम्)
It does not look like a curse, but a perfect intro sloka to bless vishnu for your ramayana epic.
Thus explained brahma and blessed him to write entire story of rama in poetry form.
Jai Sriram... Jai Sriram...