For a contract to be enforceable, what the parties are agreeing to do must itself be legal. That requirement is what lawyers mean by the legality of object in contract law: the purpose of the deal, not just its form, has to be something the legal system permits. When the object is illegal, courts refuse to enforce the agreement, refuse to award damages, and generally leave the parties wherever their failed scheme has left them.
What a Lawful Object Requires
Every enforceable contract needs a lawful object, meaning the goal the parties are trying to accomplish is something the law permits. The Restatement (Second) of Contracts frames this in terms of public policy: a contract term is unenforceable if legislation says so, or if the public interest in blocking enforcement clearly outweighs the parties’ interest in holding each other to the deal. Courts weigh the parties’ reasonable expectations, the seriousness of any misconduct, and whether refusing enforcement would actually advance the policy at stake.
The object must stay lawful from signing through performance. A deal that starts out legal but later conflicts with a new statute or regulation runs into what lawyers call supervening illegality. If a change in law permanently bans the contract’s purpose, the agreement is discharged. If the ban is temporary, performance is suspended until the restriction lifts. The change has to be unforeseeable, and neither party can have caused the impossibility.
Objects Forbidden by Statute
The clearest illegal objects are activities a statute flatly prohibits. If the law says you cannot do something, a contract to do that thing is void from the start.
Restraints on Trade
The Sherman Act makes it a felony to enter any contract or conspiracy that restrains interstate trade, with price-fixing between competitors and market-allocation schemes as the classic examples. Penalties include fines up to $100 million for corporations and prison terms up to 10 years for individuals.1Office of the Law Revision Counsel. 15 USC 1 – Trusts, Etc., in Restraint of Trade Illegal Any contract built around one of these arrangements is unenforceable, and the parties face civil and criminal exposure on top of losing the deal.
Controlled Substances and Unlicensed Services
Contracts for the sale or distribution of federally controlled substances are void. The same goes for professional services performed without a required license. A contractor, attorney, or healthcare provider who works without proper credentials generally cannot sue for unpaid fees, even if the work was done competently. Courts treat licensing requirements as public protection measures, and the price of ignoring them is losing access to the courts to collect.
Consumer Review Clauses
Some statutes void specific contract terms rather than entire agreements. Under the Consumer Review Fairness Act, any clause in a standard-form contract that prohibits or penalizes a consumer for posting an honest review is void from the moment the contract is signed. The law also bars clauses that force consumers to transfer intellectual property rights in their reviews. The FTC and state attorneys general enforce it, treating violations the same as unfair or deceptive trade practices.2Office of the Law Revision Counsel. 15 USC 45b – Consumer Review Protection
Objects Contrary to Public Policy
Some contracts violate no specific criminal statute but are still unenforceable because enforcing them would damage interests the legal system is built to protect. These rules come from case law developed over centuries, and they cover arrangements the courts simply will not back.
Restrictions on Working
Non-compete agreements are the most frequently litigated example. Courts evaluate them under a reasonableness test with three factors: the length of the restriction (anything beyond two years draws heavy scrutiny), the geographic area it covers, and the scope of activities blocked. A non-compete that effectively prevents someone from earning a living in their field is likely unenforceable.
Federal regulation here has not stuck. The FTC proposed a near-total ban on non-competes in 2024, a court blocked it, the agency dismissed its appeal in 2025, and the rule was formally removed in early 2026.3Federal Trade Commission. Noncompete Rule Enforceability is therefore a state-by-state question, with some states barring non-competes almost entirely and others enforcing those that pass the reasonableness test.
Interference With Government and Justice
Contracts that encourage a public official to neglect duties or accept personal benefits for official acts are consistently struck down, and so are agreements that interfere with the administration of justice, like paying a witness to lie or bribing a juror. Courts refuse enforcement because the social harm is too plain to ignore, even when no specific statute reaches the exact conduct.
Liability Waivers
An exculpatory clause tries to shield one party from liability for its own negligence or wrongdoing. Courts frequently refuse to enforce these when the service involved is of significant public importance, when one party had vastly more bargaining power, or when the clause attempts to waive liability for intentional harm. The analysis turns on whether the clause exploits a power imbalance to strip away protections the law normally provides.
Usury and Gambling
Loan agreements that charge interest above the legal maximum are unenforceable as usurious. Penalties vary by jurisdiction and can include forfeiture of all interest, or in some states, forfeiture of the entire principal. Wagering contracts were historically treated the same way. That has shifted as states have legalized and regulated sports betting and casino operations, but where gambling remains illegal or unregulated, the contract still cannot be enforced in court.
Fraudulent Objects
An agreement designed to defraud a third party has an unlawful object even if the two contracting parties are perfectly happy with the arrangement. Schemes to deceive insurance companies with inflated or fabricated claims fall here. So do contracts to hide assets from creditors during bankruptcy proceedings; federal law specifically targets anyone who carries out or conceals a fraud scheme by filing for bankruptcy or submitting documents in a bankruptcy case.4United States Department of Justice. Criminal Resource Manual 879 – Bankruptcy Fraud 18 USC 157
Participants in these deals get no help from courts. They cannot enforce the arrangement against each other, recover money paid to a co-conspirator, or sue for damages when the scheme collapses. Anyone who uses interstate commerce to carry out an unlawful activity also faces federal exposure under the Travel Act, with penalties of up to five years in prison for most offenses and up to 20 years when the crime involves violence.5Office of the Law Revision Counsel. 18 USC 1952 – Interstate and Foreign Travel or Transportation in Aid of Racketeering Enterprises
What Happens When the Object Is Illegal
The standard result is that the entire contract is void from inception. No party can enforce its terms, demand performance, or recover losses through the courts. Three related rules shape how that plays out.
In Pari Delicto
When both parties share equal blame for the illegal purpose, courts leave them exactly where they are found. No refunds, no damages, no equitable adjustments. The rule is deliberately harsh. The point is deterrence: if you cannot count on a court to clean up after an illegal deal, you have a strong reason not to enter the deal in the first place.
Severability
Courts sometimes salvage the lawful portions of a partially tainted agreement. Under the Restatement’s framework, a court can enforce the legal parts if the illegal portion is not essential to the bargain and the party seeking enforcement did not engage in serious misconduct. This works only when the unlawful term can be cleanly removed. If the illegality is woven through the deal, severability cannot save it.
Independent Liability
Voiding the contract does not immunize anyone from other legal consequences. Parties may face criminal prosecution, regulatory fines, loss of professional licenses, or civil lawsuits from injured third parties. Those consequences exist on their own track and often carry penalties well beyond whatever the contract was worth.
When Courts Will Still Grant Relief
The refusal-to-enforce rule has important exceptions. Without them, blanket non-enforcement would undermine the very policies it is supposed to serve.
Protected-Class Exception
When a statute makes a contract illegal specifically to protect a certain class of people, members of that class can still recover. The law was designed to shield them, not punish them. Federal securities law makes contracts for the sale of unregistered securities illegal, but buyers get an explicit right to rescind and recover their money.6Office of the Law Revision Counsel. 15 USC 78cc – Validity of Contracts An employee who works hours exceeding a federal safety cap can still recover unpaid wages, even though the contract to work those hours was technically illegal.
Withdrawal Before Performance
Under the doctrine of locus poenitentiae, a party who withdraws from an illegal agreement before the unlawful purpose is carried out can recover what they already transferred. Encouraging people to abandon illegal plans serves the public interest more than trapping them in a no-recovery situation, so courts treat withdrawal as a significant factor when deciding whether to grant relief.
Unequal Fault
In pari delicto bars recovery when both sides are equally at fault. When one party is significantly less culpable, courts may let that party seek relief. This comes up often in cases involving fiduciary relationships, where one party had a professional duty to prevent the illegal conduct in the first place.
Raising Illegality if You Are Sued
If someone sues you on a contract you believe has an illegal object, illegality has to be raised as an affirmative defense in your answer. Federal Rule of Civil Procedure 8(c)(1) explicitly lists illegality among the defenses a responding party must affirmatively state.7Legal Information Institute. Federal Rules of Civil Procedure Rule 8 – General Rules of Pleading Failing to raise it in your initial response can waive the defense entirely. Some courts will notice illegality on their own and refuse enforcement even if neither party flagged it, but relying on that is a bad bet. If you think a contract’s purpose is unlawful, put the issue in front of the court at the first opportunity.