On Liberty is essentially a meditation on the relationship between individuals and the state, an essential issue during the nineteenth century, when the state increasingly came to be seen as the guarantor of individual liberties. This principle was known as liberalism, and Mill himself was one of its most important philosophers. By the nineteenth century, liberals argued for more popular participation in government, and Mill, while fully supportive of democracy, also was concerned with how to protect the rights of a minority within a government founded on the principle of majority rule. By the time Mill wrote On Liberty, Britain had already experienced an expansion of the electorate, and he observed that while this was a beneficial development, there was always a danger of what he called, borrowing a phrase from Alexis de Tocqueville, the "tyranny of the majority." Liberal democratic states must, he thought, include protections for minority rights. But the most fundamental question Mill considered was the proper relationship between individual liberty and the authority of the state. To protect one person's liberties required the exercise of coercive state power over the liberties of another. The proper balance, he argued, was struck by a democratic government that used its power only to keep individuals from harming each other:
As soon as any part of a person's conduct affects prejudicially the interests of others, society has jurisdiction over it, and the question whether the general welfare will or will not be promoted by interfering with it, becomes open to discussion. But there is no room for entertaining any such question when a person's conduct affects the interests of no persons besides himself, or needs not affect them unless they like (all the persons concerned being of full age, and the ordinary amount of understanding).
Mill was driven to write On Liberty, then, because of his concern that politicians (including Mill himself, who was a member of Parliament for a time) had yet to think through some of the pressing question in a liberal democratic society. By articulating the proper relationship between the individual and the state, he hoped to fulfill the utilitarian ambition of devising a society where happiness would come to the most possible people.