As Valmiki tells it
Valmiki Ramayana, Kishkindha Kanda 12 to 18 · 3 min read
In the hills of Kishkindha lived two monkey brothers, Vali and Sugriva. Vali was the elder and the king, and he was the strongest creature in the forest. Once he chased a demon into a cave and told Sugriva to wait at the mouth. A year went by. Then blood came out of the cave, and Sugriva, sure his brother was dead, rolled a rock across the mouth and went home and was made king.
But Vali had killed the demon. He pushed the rock aside, came home, found his brother on his throne, and would not listen to a word. He drove Sugriva out of the kingdom and took his wife Ruma for himself. Sugriva fled to the hill of Rishyamuka, the one place Vali could not follow because of an old curse.
There Rama found him, searching for Sita, and the two made a pact by a fire. Rama would kill Vali. Sugriva would send his monkeys across the earth to find Sita.
Sugriva went to the gates of Kishkindha and roared a challenge. Vali came out, and the two brothers fought. They looked so alike that Rama, watching from behind a tree with his bow drawn, could not tell which was which, and did not dare shoot. Sugriva was beaten and ran back bleeding.
"You let him beat me," he said.
"I could not tell you apart," said Rama. "Go back and wear this." He hung a garland of flowers around Sugriva's neck.
Sugriva roared at the gates again. In the palace, Vali's wife Tara held him back. "He was beaten once and has come back at once," she said. "He has found someone to help him. I have heard there are two princes in the forest. Do not go."
Vali would not hear it. "I cannot sit at home when I am challenged," he said, and went out.
They fought again, and this time Sugriva was tiring when Rama drew his bow and shot Vali in the chest from behind the tree. The great monkey fell like a tree cut down.
Rama and Lakshmana came out and stood over him. Vali looked up at them. "You are a prince of the Ikshvakus," he said. "They say you are just. I was not fighting you. I did you no harm. You struck me from hiding, while I was fighting someone else. What will you tell the good men of the world when they ask how Rama fights?"
Rama answered him. "This land belongs to the Ikshvakus, and Bharata rules it, and we judge in his name. You took your younger brother's wife while he was alive. That is a crime for which the law gives death. As for the way I shot you, men shoot animals from hiding, and you are of the forest."
Vali was quiet for a long time. Then he said he had done wrong, and he asked Rama to look after his son Angada, and to make sure Sugriva did not punish Tara. Tara came running and threw herself on his body, and Vali gave Sugriva his golden necklace and died.
Sugriva wept for his brother. Then he was crowned king of Kishkindha, and Angada was made heir, and when the rains were over the monkeys went out to search for Sita.