The Scouring of the Shire is a chapter from the fantasy novel The Lord of the Rings written by J. R. R. Tolkien. It is the eighth chapter of Book VI and the penultimate chapter of the whole story.

In the final volume of the story, Gandalf the wizard, and Hobbits Frodo Baggins, Samwise Gamgee, Meriadoc Brandybuck, and Peregrin Took stay overnight at ''The Prancing Pony'' in Bree, where they catch up on the last year's local events with proprietor Barliman Butterbur. They learn that strangers who came from the South have come to settle in and around Bree, much to the discomfort of the peace-loving Men and Hobbits indigenous to the region. Barliman learns that Strider has been crowned King of Gondor.

Gandalf parts ways with the Hobbits to the Shire in order to talk to Tom Bombadil. Gandalf tells the four that their experience in the War of the Ring will be sufficient to settle the troubles.

When they discover that the evil they had fought in Mordor had come home to roost, they rouse the Shire and are able to kill or drive off the evil-doers that infested it. With the assistance of Farmer Cotton, Merry and Pippin lead the Battle of Bywater, the last battle in the War of the Ring, in which 19 hobbits died. 

The returning Hobbits find that the thugs' leader is the fallen wizard Saruman, who has taken up residence at Frodo's former home, Bag-End, along with his servant Gríma Wormtongue. The Hobbits decide to allow them to leave the Shire unharmed, but Saruman dies shortly thereafter, when Wormtongue avenges his abuse at the hands of his master by cutting Saruman's throat; Wormtongue is then killed by the Hobbits with arrows as he tries to flee. A column of smoke arises from Saruman's corpse and is blown away in the wind, a scene reminiscent of Sauron's demise. Frodo covers the suddenly shriveled skull of Saruman and turns away.

The events of "The Scouring of the Shire" do not occur in any film adaptation of the novel to date. It is not featured in the 1980 animated version of The Return of the King, and it was only referenced in the 2001-03 film trilogy by Peter Jackson.

In "The Fellowship of the Ring", the Mirror of Galadriel does foretell the Ruffians taking over the Shire as in the novel. However, when the hobbits return to the Shire in "The Return of the King", the Shire is unchanged, so within the film adaptation this is intended as an alternate future that was avoided. In the extended edition of The Return of the King, Wormtongue stabs Saruman to death and is in turn killed with bow and arrow as in the novel; however this takes place at Isengard instead of the Shire, and Legolas is the one who shoots Wormtongue.</p>

Tolkien admitted, grudgingly, that the transformation of the Shire from rural idyll to industrial wasteland was an allegory of what he viewed, the destruction of the English countryside because of industrialization. The loss of the old Mill in Bywater, which was to be replaced by a much larger, grimier version, mimics an event from Tolkien's childhood. Tolkien commented that the symbolism also lay in the feeling of loss he felt after returning from the First World War, to discover that many of his close friends had died, and the world he remembered from his youth had largely disappeared.