The distinction between immorality and illegality is the distinction between that which applies to the private sphere of a man’s mind and that which governs the behavior of men in a social setting. However, because man is an indivisible entity possessing both mind and body, the specific nature of his thoughts can certainly inform the nature of his actions. In other words, a man can have immoral thoughts and act upon them, which would make his actions also immoral; nevertheless, his immoral actions may not necessarily be illegal or criminal acts.
All that which is immoral is not necessarily also illegal. For example, it is immoral to pleasureably fantasize about plundering your neighbors home, raping their 10-year-old kid, and then hacking them all to death. Insofar as these remain merely fantasies, no crime–no act of force or fraud–has been committed and therefore there is nothing illegal or criminal about the thoughts. Nevertheless, in the privacy of his own mind, this person is an immoral–possibly deranged and psychopathic–individual; and if these thoughts were ever expressed in words to another sane individual, the proper response would be to condemn such fantasies as disgustingly immoral. One cannot respond with a neutral or amoral evaluation.
Morality is a private, individual affair: each man requires (and has) a moral code to guide him in living his life. His life can only be lived by him. His thoughts–about morality or anything else–can only be thought of by himself in his own head. Thinking–the process of cognition–is a private affair. Thoughts, therefore, belong only to an individual. Evaluating the morality of thoughts, therefore, is an evaluation of a private process of cognition.
Virtues, for example, are qualities and actions of an individual in pursuit of his values in reality. The virtue of honesty is a policy set by a man in relation to his mind’s grasp and acknowledgment of reality and facts–it is his commitment to never fake or evade the matters of fact as they objectively exist; only derivately is the virtue of honesty related to man’s interaction with others: a man could very well lie to himself and evade certain facts in the privacy of his own mind. Such a person is not practicing the virtue of honesty–even though he has lied to no one else; and to that extent, this person is immoral and irrational. His immoral thoughts, however, are not criminal or illegal.
Objective law does not punish a man for holding the wrong ideas or for being an untrustworthy character; usually, the punitive consequences of private immorality and irrationality arise from reality’s own exacting nature, from the requirements of survival, and the nature of an entity (for example, a man’s immoral thoughts may create a reciprocal relationship with feelings of self-disgust, repulsion, low self-esteem, psychological insecurity, repression of certain motives and emotions, evasive psychology, unhappy relationships, etc.).
Now, only when man puts his morality into practice or expresses his thoughts in explicit actions, is he stepping out of the private sphere of his mind–and even then, unless man is not surrounded in a social context with other men, the physical manifestation or practice of his immoral thoughts does not amount to a crime, they remain his own immoral actions.
The concept of crime exclusively denotes a certain set of actions in a social context, namely acts of force or fraud against others:
A crime is a violation of the right(s) of other men by force (or fraud). It is only the initiation of physical force against others—i.e., the recourse to violence—that can be classified as a crime in a free society (as distinguished from a civil wrong). Ideas [even immoral ideas], in a free society, are not a crime—and neither can they serve as the justification of a crime. — Ayn Rand
A social context is necessary for human flourishing, because–among other benefits–it provides the framework within which a division of labor society can emerge and thrive. Thus, man has to live in a society with other human beings and derive the benefits of voluntary trade in order to achieve flourishment. The concept of rights are the conditions that allow a man to enter a social context with a guarantee of life and liberty; rights allow man to practice his moral code and pursue his values (and disvalues) in a social context.
Therefore, the concept of rights is a political and social concept and applies exclusively to actions–not thoughts. That which is illegal necessarily requires the violation of rights, i.e., an action that mitigates or suppresses someone else’s rights by the introduction of force or fraud. In contrast, the immoral is not judged primarily against a social context, but against the context of an individual and his relationship to reality.
Therefore, the business of government is not to interfere in the advocacy or suppression of whatever ideas it considers moral or immoral. The purpose of the government–and of law enforcement agencies–is solely to examine individual actions to ascertain whether a crime (force or fraud) has been committed, and act in response to the severity of the crime. When the government punishes a criminal, it is not for his immoral ideology or set of beliefs that the punishment is awarded but specifically for his crime–the act and its severity.
To claim that the government can punish a man for his ideas is to grant the government legitimacy as a moral arbiter. Once this is granted to the government, it is only a matter of a few more rationalistic deductions thereafter to argue that the government should get into the business of ideological advocacy or suppression, i.e., become the thought-police of society, or institute a Communist state (see “Enforcing Moral Values“).
Few would defend the view that the government should reward men who have moral ideas by granting them (say) free property, health care, trips to the Bahamas, etc. Then, on what grounds can the government legitimately punish a man for immoral ideas, or what it may consider to be ”thought-crimes”? On what grounds can the government punish people with immoral ideas (like racism or Nazism, which motivate so-called “hate crimes”), monitor the “moral fiber of society,” and censor certain ideas (like pornographic stories)? If it is not sufficient–or even permissible–to convict an individual for homophobia or racism, then why should there be special status granted to actions motivated by such thoughts that are clearly out of the bounds of legal punishment? Why are crimes motivated by homophobia or racism considered particularly heinous “hate crimes” that require special legislation and sentencing?
There is simply no legitimate ground for such government interference in the realm of ideas–be they moral or immoral–unless one subscribes to the notion that the government is a legitimate authority on morality and is the ultimate arbiter in moral affairs; this notion, in turn, has no other foundation other than the basis of collectivism, according to which, morality is not a private individual affair but a collective one and that an individual alone has no use or need for a moral code of principles.
Thus, maintaining clear boundaries between the spheres of the individual and the social, the domain of morality and legality, the concepts of morals and rights, the concepts of thought and action is as crucial as choosing between life and death, slavery and freedom, a dictatorship and a free society.
[Edits: Added a paragraph on the necessity of a social context for rights and human flourishment and an elaboration on hate crime laws.]