Shelob was a monster of ancient evil in spider-form, the last and greatest child of Ungoliant, that primeval devourer of light. Older than Sauron and caring nothing for him nor for any lord but her own hunger, she had crept into the Mountains of Shadow in the deeps of time and made her lair in the tunnels of Cirith Ungol above Minas Morgul, weaving her webs across the high secret pass into Mordor. There she trapped and devoured Orc and Elf and Man alike; and Sauron, knowing of her, was content to leave her as a watchful guard upon that hidden door, and would at whiles send her captives to feed upon.
It was to Shelob's lair that Gollum led Frodo and Sam, hoping the spider would slay them and leave the Ring among their bones for him to take. In the reeking dark she stung Frodo with her great sting and bound him in her cords, thinking him dead; but Sam, in fury and grief, took up the Phial of Galadriel, whose star-light she could not endure, and the sword Sting, and gave her such wounds as she had never known -- piercing one of her clustered eyes and driving the blade up into her belly when she bore down to crush him. Shrunken and beaten, she dragged herself away into a dark cleft to nurse her malice, and passes thereafter out of the tale; what became of her in the end is not told.