Henry David Thoreau gives an account of his experience in prison in his famous essay "Civil Disobedience." He was put in jail for refusing to pay a poll-tax, arguing that the tax supported the institution of slavery and an unjust war against Mexico. He spent just one night in prison. Someone else paid his tax and he was released the next day. He writes that the night in prison was "novel and interesting enough." His cellmate was amiable, and Thoreau conversed for a long time with him.
In his essay, Thoreau tells of several ethical lessons that he learned as a result of his time in prison. These lessons profoundly influenced other important rebels against injustice such as Mahatma Gandhi, Leo Tolstoy, and Martin Luther King, Jr.
One ethical lesson involves the importance of standing up for ideals. Thoreau writes:
Under a government which imprisons any unjustly, the true place for a just man is also a prison.
Thoreau believed fervently that the poll-tax was being used for unjust causes, and so he refused to pay it, regardless of what might happen to him personally. He realized when he was in prison that he was freer than the townspeople he saw walking around outside. The walls of the prison did nothing to hinder his freedom, because his true freedom rested in a clean conscience. He writes:
I did not for a moment feel confined, and the walls seemed a great waste of stone and mortar.
He explains that the government has superior physical power, but not superior moral or intellectual power.
Thus the State never intentionally confronts a man's sense, intellectual or moral, but only his body, his senses. It is not armed with superior wit or honesty, but with superior physical strength.
Thoreau's point here is that a truly free person is free because he or she follows the dictates of conscience, not formal laws that may be just or unjust. Such people cannot be hindered by government, because they carry their freedom within, no matter what might happen to them.
Thoreau makes it clear that he is willing to pay the highway tax, which improves the roads, but he will not blindly pay any tax, regardless of what it is used for. He is willing to rebel against the State if he thinks that the money he gives in taxes might be used to harm another person. He is more concerned with other matters, though, and in the larger picture gives little thought to government.
However, the government does not concern me much, and I shall bestow the fewest possible thoughts on it.
In conclusion, Thoreau's ethical lessons have to do with following individual conscience above all, even if it goes against the laws of government. In this viewpoint true moral and intellectual freedom can be found. Ultimately, retaining this pure freedom may involve going to jail, but it is important to remember that if this happens, the person who is jailed for freedom is freer than those on the outside.