In the epic Ramayana, Lavanasura, the demon was killed by Shatrughna, the youngest brother of Lord Rama.
When lord Rama ruled Ayodhya then peace existed in most places, Lavanasura continued to torture the innocent and destroy many sacrifices of sages and terrify them in many ways. Many rulers of that time were defeated by Lavanasura and they were all frightened.
One day the sages headed by sage Chavana came all the way from Madhuvan to Lord Rama with a plea to protect them. Lavanasura was the son of king of asuras named Madhu.
Madhu on contrary was a kind and compassionate to Brahmans. Madhu made personal friendships with Devas and therefore Asuras and Suras were at peace. He was so enjoyable to the gods that Lord Shiva individually came and gave him an expansion of his own trident for self-protection. Madhu built a palace and named the place as Madhupuri.
Lavanasura or Lavana was so immoral that even as a child he would beat playmates, kill them, and eat them. Madhu in terror handed everything over to his son including his trident and drowned himself in the ocean because of embarrassment.
In another legend Lavanasura is described to defeat Mandatta. There was a king named Mandatta who was a descendant in the dynasty of Ikshvaku. Mandatta had subjugated the whole earth and he became so proud that he wanted to rule heaven also. Mandatta challenged Lord Indra and fight with him in battle. Indra said that if Mandatta defeated all personalities on earth, then he will give his kingdom. Lavanasura defeated Mandatta's army with the trident. Hearing all these, Lord Rama promised that he would protect the sages and the kingdom of Madhupuri.
Bharata assisted Rama to fight against Lavanasura. Shatrughna expressed his wish to fight Lavanasura, wanting an opportunity to serve Rama. All the brothers of Rama agreed that Shatrughna should go and defeat Lavanasura. Rama then gave Shatrughna a deity of Varaha, which manifested from Lord Kapila's mind. When Lord Rama defeated Ravana, this deity was taken to Ayodhya. Shatrughna was then coroneted as the king of Madhupuri. Shatrughna then left with a huge army to fight with Lavanasura. Rama cautioned Shatrughna to find a way to fight with Lavanasura without his holding the invincible trident. Shatrughna stood before the gate where Lavanasura dwelt and positioned himself alone. While Lavanasura returned his residence after hunting animals for eating each day, Shatrughna challenged him to fight. Lavana was very pleased to accept the challenge because it was his pastime. Lavanasura uprooted many trees and threw them on Shatrughna, and a big battle started. Shatrughna threw an extraordinary arrow at Lavanasura. This arrow was used for killing Madhu and Kaitabha, given as a gift by Lord Vishnu that Rama had given him. As Shatrughna strung his bow, the whole universe started to shake. The arrow struck Lavanasura right in the heart and killed him. Shatrughna was made the emperor of Madhupuri, where he ruled for numerous years.