The harm principle is articulated most clearly in John Stuart Mill's On Liberty, though it is also articulated in John Locke's Second Treatise of Government and in the work of Wilhelm von Humboldt, to whom Mill is obliged and discusses at length. Mill argues that the sole purpose of law should be to stop people from harming others and that should people want to participate in victimless crimes, crimes with no complaining witness, such as gambling, drug usage, engaging in prostitution, then they should not be encroached in doing so.
See more at Wikipedia.org...