Valmiki (Sanskrit; /vɑːlˈmiːki/;Valmiki) is celebrated as the harbinger-poet in Sanskrit literature. The epic Ramayana, dated variously from 5th century BCE to first century BCE, is attributed to him, based on the attribution in the text itself. He is revered as the Ādi Kavi, which translates to First Poet, because he is said to have invented shloka (i.e. first verse or epic metre), which set the base and defined the form to Sanskrit poetry.
The Uttara Kanda tells the story of Valmiki's early life, as a highway robber named Ratnakar, who used to rob people after killing them. Once, the robber tried to rob the divine sage Narada for the benefit of his family. Narada asked him if his family would share the sin he was incurring due to the robbery. The robber replied positively, but Narada told him to confirm this with his family. The robber asked his family, but none agreed to bear the burden of sin. Dejected, the robber finally understood the truth of life and asked for Narada's forgiveness. Narada taught the robber the mantra for salvation. But, the mantra in question, the name of Lord Rama, was not to be given to murderers and the like. Narada thus told Valmiki to chant "Mara" the phonetic anagram of "Rama" instead to circumvent this restriction. The robber meditated for many years, so much so that ant-hills grew around his body. Finally, a divine voice declared his penance successful, bestowing him with the name "Valmiki": "one born out of ant-hills" (Valmikam in Sanskrit means Ant-hill).
The youthful sage Narada at the white-bearded Valmiki's hermitage
Sita in Valmiki hermitage
The Ramayana, originally written by Valmiki, consists of 23,000 shlokas and 7 cantos (kaṇḍas) including the Uttara Kanda. Ramayana is composed of about 480,002 words, being a quarter of the length of the full text of the Mahabharata or about four times the length of the Iliad. The Ramayana tells the story of a prince, Rama of Ayodhya, whose wife Sita is abducted by the demon-king (Rakshasa) of Lanka, Ravana. The Valmiki Ramayana is dated variously from 500 BC to 100 BC, or about co-eval with early versions of the Mahabharata. As with many traditional epics, it has gone through a process of interpolations and redactions, making it impossible to date accurately.
Valmiki is also quoted to be the contemporary of Rama. Rama met Valmiki during his period of exile and interacted with him. Valmiki gave shelter to Sītā in his hermitage when Rama banished her. Kuśa and Lava the twin sons of Sri Rama were born to Sītā in this hermitage. Valmiki taught Ramayana to Kuśa and Lava, who later sang the divine story in Ayodhyā during the Aśvamedha yajña congregation, to the pleasure of the audience, whereupon, King Rama questioned who they were and later visited Valmiki's hermitage to confirm if the Sita, the two children claimed as their mother was in fact his wife in exile. Later, he summoned them to his royal palace. Kuśa and Lava sang the story of Rama there, and Rama confirmed that whatever had been sung by these two children was entirely true.
Valmiki was going to the river Ganges for his daily ablutions. A disciple by the name Bharadwaja was carrying his clothes. On the way, they came across the Tamasa Stream. Looking at the stream, Valmiki said to his disciple, "Look, how clear is this water, like the mind of a good man! I will bathe here today." When he was looking for a suitable place to step into the stream, he saw a crane couple mating. Valmiki felt very pleased on seeing the happy birds. Suddenly, hit by an arrow, the male bird died on the spot. Filled by sorrow, its mate screamed in agony and died of shock. Valmiki's heart melted at this pitiful sight. He looked around to find out who had shot the bird. He saw a hunter with a bow and arrows, nearby. Valmiki became very angry. His lips opened and he cried out,
You will find no rest for the long years of Eternity
For you killed a bird in love and unsuspecting
Emerging spontaneously from Valmiki's rage and grief, this was the first shloka in Sanskrit literature. Later Valmiki composed the entire Ramayana with the blessings of Lord Brahma in the same meter that issued forth from him as the shloka. Thus this shloka is revered as the "first shloka" in Hindu literature. Valmiki is revered as the first poet, or Ādi Kavi, and the Ramayana, the first kavya (poem).
His first disciples to whom he taught the Ramayana were Kusha and Lava, the sons of Rama:
प्रचेत्सोऽहं दशमः पुत्रो राघवनंन्दन |
न स्मराम्यनृतं वाक्यमिमौ तु तव पुत्रकौ || 96:16
In another verse, it is also stated that he is from the lineage of the sage Bhārgava: