Bilbo names his sword "Sting", after he uses it to kill the giant spider. He does this by himself in Mirkwood, and in doing so frees himself and his friends from the spider. This leaves him feeling much more sure of himself and his abilities. Sting is really a large dagger, rather than a sword, but as Hobbits are small it makes an effective sword for him. When he returns to the Shire, Sting hangs over Bilbo's mantelpiece, until Bilbo gives Sting to Frodo to assist him in destroying the One Ring.

Ok Orcs have nothing to do with why Bilbo named it Sting, and while it is of Elven make it's not made of Mithril as only the Dwarves worked with Mithril. Sting is named wholly because of Bilbo's encounter with the spiders

"Somehow the killing of the giant spider, all alone by himself in the dark without the help of the wizard or the dwarves or of anyone else, made a great difference to Mr. Baggins. He felt a different person, and much fiercer and bolder in spite of an empty stomach, as he wiped his sword on the grass and put it back into its sheath." "I will give you a name," he said to it, "and I shall call you Sting."

Bilbo names his sword sting because it is made by elves from "Mithrail Silver". The sword glows blue when Orcs are present. Bilbo figures that the sword will give the Orcs a sting because it is really not much more than a dirk compared to the larger swords that the others in the traveling party bring with them. However, Bilbo is able to free the dwarves from the spidres by using Sting to cut the webs.

He is careful with Sting and later passes it on to Frodo in another book.