In the first section of summarizing Chapter V, we reviewed Mill's rationale for analyzing the relationship between justice and utility. We then considered his survey of justice and his parsing of justice into sympathy and self-defense sentiments. Thereafter, Mill concerns himself with elucidating the relationship between self-defense and utilitarian considerations.
Mill sees self-defense (i.e. the desire to see injustices punished) as an interest in the preservation of society at large because these sentiments are universalized from one's individual case by the vehicle of sympathy. He notes that self-defense can of course also act solely on an individual, selfish level, but that this is neither commendable nor just. This counter is very similar to the move he makes when accounting for people who choose lesser pleasures over higher pleasures because of a weakness of character.
It is worth noting that Mill recalls Kant here, making a point similar to the point from Chapter I of this treatise. Mill recalls him because notions of justice and universalizability are often bound up in deontology, and Mill wants to make the point that Kant's categorical imperative would allow for people to make blatantly selfish and unjust choices unless considerations of collective human interest are added as a supplementary condition. This is the bridge from concerns of justice to utility.
Mill turns from here to a deeper analysis of what it is meant to say that someone has a right. By his account, to conceive of someone having any sort of right is tantamount to saying that society is under an obligation to satisfy the conditions of the right for that person. So, for example, if someone has a moral right to life, then society would be obligated to not kill him.
Mill argues that the matrix of rights that people are owed creates a framework for a harmonious and functional society. Creating the mandate of justice, these rights also manifest in a utilitarian framework of deciding the good based on the interests of every person's happiness. This is how Mill sees the moral theory of utilitarianism dovetailing with dictums of justice.
Anticipating the objection that calculations of utility seem uncertain whereas sentiments of justice usually feel absolute, Mill points out that this is actually a false accusation. He points out that the various maxims of justice can conflict and demand both on the societal level and within the mind of one individual. This is one reason why it is logically possible and often the case that law, built to reflect justice, can be unjust.
Mill closes the account by pointing out that justice and expediency are not effectively the same thing; rather, justice is a particular array of moral rights that form a basic framework within which society is operable, and expediency is one of the fundamental considerations from which it is derived. Mill expands this underlying principle, positing that it encapsulates all of morality in addition to underpinning our concept of justice. This line of reasoning closed, Mill concludes his treaty, having laid out comprehensively his theory of utilitarianism.
This final section resolves, in Mill's mind, the tension between justice and utility. The reader will remember from the last section that the tension, turning primarily on the sense in which justice appears inherent to the external world, might not actually exist if we choose to reject that premise. That notwithstanding, this section is worthwhile because it includes Mill's discussion of moral rights.
Mill sees moral rights as the intersection between utilitarianism and justice. For in Mill's view, moral rights constitute that which the individual is intrinsically owed by society. This forms the basis of what actions are just and unjust, and also form the basic parameters for utilitarianism.
It is worth taking the time to parse out just how this relationship works. Justice, in Mill's school of thought, is primarily a prohibitionary moral framework - that is to say, it establishes limits of what it is immoral to do to people. A more complete account of this can be seen in the later chapters of Adam Smith's The Theory of Moral Sentiments, which heavily informs this chapter of Mill. On one interpretation, then, justice is concerned with the privation of pain.
Utilitarianism as a moral theory is concerned with how one ought to act in maximizing the yield of happiness. It is very much a tool by which one can calculate how to behave in morally upstanding ways (provided one subscribes to the philosophy). So in this way, the theory complements justice well: moral rights of people form a matrix of maxims against pain, and utilitarian theory informs individuals to effect the greatest moral good within that matrix.
Aside from tying together Mill's moral theory, this relation of utilitarianism to justice helps us to understand the natural emergence of Mill's political theory from a utilitarian moral foundation. The democratic belief that morality is grounded in the interests and rights of all individuals intuitively lends itself to a society with representative government. More involved political theory by Mill can be found in his Considerations of Representative Government.