Mill presents the harm principle not as a complex theory but as a single, governing rule: the only legitimate basis for collective interference with individual freedom is self-protection — preventing harm to others. Everything else is out of bounds. A person cannot be compelled to act, or restrained from acting, merely because others think it would be better for him, wiser, or more morally correct. Persuasion and argument are always permissible; coercion is not, unless harm to others is at stake.
Mill grounds the principle in a distinction between two domains: the domain of self-regarding action, which concerns only the person acting, and the domain of other-regarding action, which affects others. Within the first domain, the individual is sovereign. Society has no claim on how he lives, what he believes, or what experiments he makes of his own existence — provided he does not violate others' equal freedom. The second domain is where social authority legitimately enters, but only to protect those who may be harmed.
This is not a doctrine of selfish indifference. Mill explicitly says he does not defend a right to absolute isolation. We are bound together by sympathy, by interest, and by the effects our choices have on those around us. But the fact that your conduct affects others is not enough to make it their business — it must harm them, in a specific and serious sense, before society's coercive power becomes appropriate.
Mill is careful to ground the principle not in abstract rights but in utility — the greatest long-term benefit for humanity as a whole. Freedom is valuable not because individuals have some metaphysical right to it but because a society that respects individual liberty produces better outcomes: more innovation, more diversity of experiment, more genuine moral progress, and more fully developed human beings. The harm principle is, for Mill, both a moral boundary and a practical good.
The harm principle is stated in Chapter I of On Liberty. Mill developed it in dialogue with his wife Harriet Taylor, to whom the work is dedicated. The principle has been the starting point of liberal political philosophy ever since.

