Thoreau's imprisonment occurred because he did not support his government for which he felt was war-mongering and supported slavery. He was imprisoned because of it and urged every civilized citizen to do the same. Just as his imprisonment was unfair, so was the government's behavior towards African Americans and anyone who opposed it.