Why did Thoreau live in the woods?

Thoreau Reader:  Home - Walden

The simple answer is that Henry wanted to write, and needed a quieter place than the Thoreau household to do this. And he did write both A Week on the Concord and Merrimack Rivers and an early draft of Walden in his two years at the pond. But in Walden's "Where I Lived, & What I Lived for," he describes an additional motive...
"I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived."
Thoreau wanted to get the most from his life by determining what was really important, and he did that by removing himself somewhat from the normal life of Concord, Massachusetts in the 1840's. One side of this was economic: he reduced his material needs by living simply, so that he would not have to spend much time supporting a lifestyle that he did not need or care about. The other side was spiritual, not unlike the spiritual retreats of eastern and western religions.

And it worked. Thoreau liked it so much that he lived in his cabin for more than two years, and came back with a great story. He worked on this story for several years after leaving the Pond, until it became the Walden we know today.