James Mill, a historian of British India and a follower of the legal reformer Jeremy Bentham, kept his eldest son out of school and taught him at the table where he was writing his own history. Greek began at three and Latin at eight, and from the age of eight the boy taught his younger sisters and brothers what he learned. The education had a purpose: to produce someone who would carry Bentham's cause into the next generation. That cause was utilitarianism, the doctrine that every law and every action should be judged by one test, whether it adds to human happiness. John Stuart Mill read Bentham in the winter of 1821–2, at fifteen, and wrote later that the reading had given him a creed and, in the best sense of the word, a religion. He kept the test all his life, but the work he is remembered for began when the creed built on it failed him.
In the autumn of 1826, aged twenty, he asked himself whether it would make him happy if every reform he was working for were carried out at once. He records that the answer was no. The dejection lasted for months, and in his Autobiography he gave his own explanation of it: his training had been all analysis, and the habit of analysis wears away the feelings. The first relief came from a passage in the memoirs of the French writer Jean-François Marmontel, which moved him to tears. In the autumn of 1828 he read the poems of William Wordsworth and found in them the education of the feelings that his training had left out. He drew two conclusions: happiness comes only to people who aim at something else, and a person's feelings need cultivating as much as the intellect does.
His working life showed none of this. His father had found him a post at the East India Company in May 1823, when he was seventeen, and he stayed for thirty-five years, until Parliament ended the Company's rule in India in 1858. He wrote his philosophy around the job. In 1838 he published an essay on Bentham that set out the errors and gaps in his teacher's philosophy.
A System of Logic, Ratiocinative and Inductive (1843) argues that all knowledge, arithmetic included, comes from experience, and that the appeal to intuition protects established opinion from examination. Utilitarianism (1861) keeps Bentham's test and amends it: pleasures differ in kind, and those of the mind rank above those of the body. On Liberty (1859) holds that society may use compulsion against an adult only to prevent harm to others, and that in a democracy the pressure of majority opinion threatens the individual more than any law does. He worked that book out with Harriet Taylor Mill, whom he had met in 1830 and married in 1851. He said he had learned more from her than from all other sources together on two matters: the ultimate aims of human life, and what could be done in practice to reach them.
In 1865 the electors of Westminster sent him to Parliament, although he had refused to canvass or to spend money on the election. On 20 May 1867 he moved that the Reform Bill give women the vote on the same terms as men, and lost by 196 votes to 73; the following year he lost the seat. Mill died at Avignon in May 1873 and was buried beside his wife, who had died there in 1858. His stepdaughter, Helen Taylor, edited the Autobiography, with its account of the crisis of 1826, and it was published later that year.
In 1903 the Cambridge philosopher G. E. Moore charged that Utilitarianism confuses what people desire with what they ought to desire. That book and On Liberty are still set in university courses, and readers still argue over what counts as harm.