Once when Rama entered Ayodhya, Hanuman glimpsed Yama, God of Death, lurking in the crowd. Hanuman lashed his tail on the ground in warning.
Death fled in fear.
Then Kala, God of Time, came to Rama. "Let no one disturb us," Rama ordered Lakshmana. "Whoever disturbs us must die."
Meanwhile, the rishi Durvasa arrived. "I must see Rama!" he said.
"Please wait," said Lakshmana.
"I shall curse Rama, his sons, and his kingdom!" shouted Durvasa.
To save the kingdom, Lakshmana let Durvasa in.
"Lakshmana must die," said Kala.
Thus Lakshmana departed for the Sarayu river, and he beheaded himself there.
Inspired by: Sita: An Illustrated Retelling of the Ramayana by Devdutt Pattanaik
Notes: This story is on p. 3 of the book. The death of Lakshmana takes place in the Uttara Kanda of Valmiki, sarga 116. The detail about Hanuman and Yama comes from Pattanaik, as does the death of Lakshmana by beheading; Valmiki says only that Lakshmana "stopped his breath." Kala, the God of Time, is associated with death, as is Yama, the God of Death. Pattanaik notes, "Yama fears no one but Hanuman in popular imagination." You can read more about the angry sage Durvasa at Wikipedia, and also about Kala and Yama. In the version told in Ramanujan's essay, Three Hundred Ramayanas, it is the sage Vishvamitra who loses his temper when told to wait, and the punishment is beheading.