Civil Disobedience is a nonfiction essay that is not set in any particular time or place. Instead, Thoreau argues for a series of political and moral values that he believes can be applied in any democratic society. Still, Thoreau’s argument is framed in response to a number of key political events and institutions that were the subject of great debate in America in the 1840s: the Mexican-American War (which Thoreau addresses as “the present Mexican war”) and the institution of slavery in the United States. Thoreau speaks to this broader historical context in the first page of the essay:
The government itself, which is only the mode which the people have chosen to execute their will, is equally liable to be abused and perverted before the people can act through it. Witness the present Mexican war, the work of comparatively a few individuals using the standing government as their tool; for, in the outset, the people would not have consented to this measure.
The Mexican-American War was sparked by the annexation of Texas, considered by the Mexican government to be part of its territory, by the United States. For Thoreau and other Americans who opposed slavery, this war threatened to expand the institution of slavery to territory where it had previously been illegal due to prohibition by the Mexican government. Thoreau argues that the American government is being used as a “tool” by “a few individuals” who expect to benefit from the war, one of many instances of political injustice that he identifies throughout the essay.