‘Sting is my name – I am the spider’s bane’

So is inscribed Sting the dagger that became the sword of Bilbo and later Frodo Baggins. This trusty blade glows a light blue when orcs or goblins are near.

Not much is known about Sting’s history before Bilbo found it, though some say it was lost during the Fall of Gondolin. What is known, however, is that Bilbo discovered the magical, hobbit-sized sword in the treasure cave of three trolls while on his quest with Thorin Oakenshield. He did not use it at the Battle of the Five Armies. The sword stayed with Bilbo until Frodo began his quest to destroy the Ring.

Frodo then carried and used the blade from their stay at Rivendell onwards. When Frodo was attacked and captured by Shelob, Sam took up Sting and fought the spider, wounding it. It is likely that neither Sam or Bilbo knew the inscription on Sting, yet, it kept its name and purpose alive. Sam also saved Frodo from the Orcs of Cirith Ungol.

After Frodo destroyed the Ring, and went to the West, he gave Sting to Sam and it became a family heirloom for his family.

References:

The Lord of the Rings Weapons and Warfare (Chris Smith)

Researched by FĂ«athoron