On July 4, 1845, Henry David Thoreau moved into a cabin that he had built himself on land owned by Ralph Waldo Emerson at Walden Pond near the town of Concord, Massachusetts. His initial goal in moving to the cabin was to have privacy and time away from his father's pencil factory to write a book about a trip up the Concord and Merrimack rivers that he and his brother John had taken in 1839, three years before his brother's untimely death from lockjaw in 1842. He would spend a little over two years living at Walden Pond; during the first year he spent much of his time writing A Week on the Concord and Merrimack Rivers, which would be published in 1849.
The idea for his book Walden would come somewhat later …
Schneider, Richard. "Walden". The Literary Encyclopedia. First published 05 November 2007
[http://www.litencyc.com/php/sworks.php?rec=true&UID=8673, accessed 27 June 2017.]