Thanks for your query.
As per mythology and our scriptures, Lakshmana is the incarnation of Shesh Naga, the great serpent who carries Vishnu floating on Kshir Sagar (Ocean of Milk - Milky Way) in Vaikuntha.
Near the end of Uttara Ramayana, Yama, the God of Death approaches Rama for some discussion. Yama advised Rama that the discussion is strictly confidential and anybody who enters the room has to be sentenced to death. Rama agreed with the condition and to spare anybody from the dire fate, bestowed his beloved Lakshmana with the duty to guard the door of the room in which he entered into the discussion with Yama. After some time, Sage Durvasa approached Lakshmana and requested a meeting with Rama. When Lakshmana refused to grant entry, the short tempered Sage threatened to curse whole of Ayodhya to damnation and destruction. The fate of Ayodhya at stake, Lakhsmana decided to enter the room and inform Rama about Sage Durvasa's arrival. After knowing about the Sage's arrival from Lakshmana, Rama shortened his discussion with Yama and came out to meet Sage Durvasa.
Lakshmana, to honor the word of his brother and king, decided to give away his life. He went to River Saryu, and through his meditative powers reverted to his original form of Shesh Naga and went back to Kshir Sagar.
Incidentally, Balarama of Mahabharata, who is also considered as an incarnation of Shesh Naga, gives away his life in a similar manner when a gigantic serpent exits his mouth to enter the ocean.
Lakshmana : -
All the images are copyrighted to their respective owners.