Valmiki was the son of Sumali. Maharishi Valmiki was born in a shudra family. His birth name was Ratnakara. But the trust factor of the sources is questionable.When everyone left to travel south Sumali took his son and wife and moved near the bank of Vipasa River (Northern India).The Uttara Khanda tells the story of Valmiki's early life, as an unnamed highway robber who used to rob people before killing them. Other versions name him Valya Meet. Robbing people who passed by was the only source of money for him.
How he became Valmiki
One day Narada Muni was passing by that way when he ran into Ratnakara, who insisted them to give everything he owns, from his clothing to the shoes he was wearing. Narada asked Ratnakara why he was committing this sin. Ratnakara answered that this was the only way to provide food for his family. Narada, then, asked him if his family was part of this sin that he was committing and he told him to go ask his family that same question. Ratnakara tied Narada to a tree to make him stay in that same spot until he was back. When Ratnakara asked his parents if they were with him on the sin that he was doing, they replied that it was his job to take care of them, and that he was only responsible for his own sins. His wife also said the same thing. Ratnakara then returned to Narad Muni and fell to his feet. He told him that he alone was responsible for the sins and asked him to help him get rid of the sins he had committed. Narada told him to repeat Lord Rama's name and that would assist him. Then, after Narada left, Ratnakara went into a deep penance while reciting the Lord's name. Soon, an anthill grew around him. After a long penance, a divine light came upon him and said that he was free from all sins, and that he was to be called "Valmiki" from then (Valmiki meaning 'one who sits in an anthill' in Sanskrit).
Writer of the Ramayana
TheRāmāyaṇa, originally written by Valmiki, consists of 24,000 verses in seven cantos (some say six i.e. excluding the Uttara Ramayana) (kāṇḍas). The Ramayana tells the story of a prince, Rama of Ayodhya, whose wife Sita is abducted by the demon (Rākshasa) king of Lanka, Rāvana. The Valmiki Ramayana is dated variously from 500 BC to 100 BC, or about co-eval with early versions of the Mahabhārata.
The first śloka
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 (bird) 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 uttered the following words:
मां निषाद प्रतिष्ठां त्वमगमः शाश्वतीः समाः। यत्क्रौंचमिथुनादेकम् अवधीः काममोहितम्॥'
mā niṣāda pratiṣṭhāṁ tvamagamaḥ śāśvatīḥ samāḥ
yat krauñcamithunādekam avadhīḥ kāmamohitam
You will find no rest for the long years of Eternity
For you killed a bird in love and unsuspecting
Emerging spontaneously from his rage and grief, this was the first śloka 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 śloka. Thus this śloka is revered as the "first śloka" in Hindu literature. Valmiki is revered as the first poet, or Adi Kavi, and the Ramayana, the first kavya.
His first disciples to whom he taught the Ramayana were Kusa and Lava, the sons of Rama.