Thoreau was of course a very big fan of non-conformity as evidenced by any number of his writings as well as his decisions like going to jail instead of paying poll tax. He felt it was important to connect one's actions to one's conscience and act accordingly. Since he felt that the government was using revenue to support wars and other injustices, he was not willing to go along with the crowd and pay his poll tax and support those kinds of efforts.
He also believed strongly in the existenve of a "universal soul" that was tied to the natural world and it was imperative that each person worked out their own existence in accordance with that natural world in order to play their role in the universe. He outlined many of these feelings and philosophies in Walden and other works. He felt it was important to find the balance between living in the natural world and being a part of civilization.