Shelob is an ancient Spider that dwells in the Ephel Duath Mountains bordering the western side of Mordor. She appears in chapter nine of the fourth book of The Lords of the Rings. This takes place in volume two of the series: The Two Towers. The spider pursues Frodo and Sam on their way to Mount Doom after Gollum abandons them in her lair. She is left in a state close to death by Sam, who attacks her in a rage after finding Frodo trapped in her web. Shelob’s eventual fate is not stated in the novel.
It is noted in the Two Towers that Shelob has survived in her cave since before even the time of Sauron. In this period, Shelob grew vastly, consuming Elves and Men who wandered into her den. After Sauron came to power, she was left with comparatively little to live on as fewer and fewer of the good people of Middle-earth ventured close to Mordor. As a result she became extremely useful to Sauron, who considered her to be a viable guard, discouraging any who may have attempted entering Mordor through the pass she occupied.
Shelob has appeared in several games as both a hero unit for the goblin forces in The Lord of the Rings: The Battle for Middle-earth II and as an end level boss in the Return of the King game.
Shelob is believed to be one of the last great children of Ungoliant the great spider who assisted Morgoth in the destruction of the Two Trees: Telperion (the Silver Tree) and Laurelin (the Gold Tree). The lesser spiders of Mirkwood told of in The Hobbit which trap Thorin Oakenshield and his party are also believed to be descended from the line of Ungoliant.