Thoreau was strongly opposed to the practice of slavery, or even to acquiesence in slavery practiced by others, and so advocated "civil disobedience" as a way of expressing that opposition in a practical and effective way. By "civil disobedience," he especially meant a refusal to pax taxes to any government that was involved in any way in supporting slavery. Thoreau believed that if enought people refused to pay their taxes to such governments, slavery might more quickly be abolished.
Thoreau was absolutely against slavery in the US. He protested a poll tax as an act against the support of slavery; he protested against the Mexican War, arguing that it was simply a move to add more slave territories to the country. As long as the government of the U.S. upheld slavery, Thoreau contended, a person
...cannot without disgrace be associated with it. I cannot for an instant recognize that political organization as my government which is the slave's government also.
In a larger sense he was arguing that people's first obligation is to their own conscience, which he mentions very early in the essay: "I think that we should be men first, and subjects afterward...The only obligation which I have a right to assume is to do at any time what I think right." It's a fundamental question in a government that claims to rule by democratic principles (i.e. by majority rule.) What do we do when our conscience will not allow us to abide by majority rule, which in this case, gave legal sanction to slavery? Tocqueville had described the risks of the "tyranny of the majority," and for Thoreau, this was embodied in the Mexican War, which, as he and many others saw it, was being waged to expand the power of slavery. Therefore, he would refuse to pay his taxes to the state of Massachusetts, and he advised that others do the same: "I do not hesitate to say, that those who call themselves Abolitionists should...effectually withdraw their support, both in person and property, from the government of Massachusetts..." By not giving financial support to the government, he could register a protest.
Double post... sorry.
Thoreau's whole point in not paying taxes was to avoid helping slavery. He thought the Mexican-American War was being fought to expand slavery and he did not want to help the government do this. He said that slavery was completely immoral and that it would be better to give up slavery even if that caused the death of their "existence as a people."