The Two Towers Book 4, Chapter 10
Sam sees Frodo's sword on the ground and he charges at Shelob with it. She is surprised as he blinds one eye and then a second. Sam slashes her body and her venomous blood seeps out. Sam clutches the blade as she jumps at him, and lets the weight of her body impale herself upon the sword. She shudders and Sam reels in the stench of her filth. She stares at the hobbit with her many eyes and fears that her death has begun. He chants elvish words that he does not know and struggles to his feet. He breaks into a new rage and begins to attack her eyes some more. She hobbles to a crack in the earth and slips in ide leaving a trail of blood behind. Sam collapses next to Frodo and begins to cut the web from his body. He searches for breath or heartbeat and hears nothing. "'Did I come all this way for nothing?'" Book 4, Chapter 10, pg. 427
Sam is silent for a moment and thinks that he must carry on the quest, even though he fears it. He does not want to leave his friend's body and wonders if he is even right to take the Ring. He stoops and kisses Frodo's forehead, wiping away his own tears. He slips the necklace of the Ring around his neck and takes the phial of Galadriel. Stepping into the dark tunnel, he soon finds himself near its end. He sees that orcs are coming and slips the ring on his finger to avoid being caught. Sam realizes that Frodo is the true Ring-bearer and feels that a terrible fate has befallen him. The orcs lift the body and go running through the passage, afraid of Shelob. Sam tries to follow them but has trouble keeping up with the pace.
Near the top, Sam hears the captains arguing over Frodo's body. Some think that it is elvish. One of the orcs talks about fearing the Nazgul. He wants to be rid of the leadership of Sauron and wishes he had never come back. They talk about the impending war and wish that they had no part in it. The Nazgul told them that something was going to try to get into the gates near Minas Ithil. Two of the orcs argue about whose job it was to watch the stairs. They have seen Gollum before and decide that they should no longer interfere with Shelob's hunt. One orc says that something hurt the creature and is still lurking in the tunnels.
Sam listens carefully as the orcs realize that there must be another enemy near them because someone had to cut Frodo's cords. One of the orcs doesn't agree with this. They look at the body and make sure that all of his possessions are recorded. One orc thinks that the dead body is no good but another reminds him that Shelob's venom merely makes a body seem dead. She likes to feast on live meat. Sam comes to the grim realization that he has let Frodo become captured and almost abandoned him. The orcs want to have fun with the prisoner and Sam gets more frustrated as he tries to figure out how he is going to get into the fortress. He catches up with the orcs and listens to their singing. He cannot follow them through the doors.
"The great doors slammed to. Boom. The bars of iron fell into place inside. Clang. The gate was shut. Sam hurried himself against the bolted brazen plates and fell senseless to the ground. He was out in the darkness. Frodo was alive but taken by the Enemy." Book 4, Chapter 10, pg. 446