Mr. Justice WAYNE
delivered the opinion of the court.
It is said that the note sued upon in this case, was given for an illegal consideration.
The illegality alleged is, that the plaintiff brought slaves into the State of Mississippi as merchandise, in contravention of the statute regulating-the importation of them, and sold them to the defendant, for which the note was given in payment. It is admitted by tire-plaintiff's demurrer to the defendant's special plea, that they were so brought and sold. The court overruled the demurrer and gave judgment for the defendant. The cause is before, this court upon a writ of error sued out by the plaintiff. The law making contracts, in contravention of statutes, irrecoverable by suit, will be first stated and afterwards applied to this case.
There is no doubt that assumpsit cannot be sustained upon a contract which has not a sufficient consideration. It must not be illegal, of an immoral tendency, or contrary to sound policy. The common law maxims áre ex turpi causd, non oritur actio— ex dolo malo non oritwr actio. It prohibits every thing which is unjust or contra bonos mores. The object of all law is to repress vice and to promote the general welfare of society; and it does not give its assistance to a person to enforce a demand, originating in his breach or violation of its principles and enactments. Contracts in violation of statutes are void; and they are so whether the consideration to -be performed or the act to be done be a violation of the statute.
A statute may either expressly prohibit or enjpin an act, or it may impliedly prohibit or enjoin it, by' affixing á penalty to the performance or omission thereof. It makes no difference whether the prohibition be expressed or implied. In either case, a contract in violation of its provisions is void. The rule is certain and plain. The practice under it has been otherwise. The decisions in the English courts have been fiuctuating and counteracting. Those in the courts of our States have followed them without much discrimination. No one can-read any one of the recent elementary treatises upon contracts without noticing the differences of opinion among judges as to the operation, of the rale. Showing, however, as they do, the history of these differences, they may lead to more conformity of judicial opinion hereafter in this respect.
The character of these differences will be seen by noticing one of them. Others might easily be made.
Within a few years we were told, in the English Reports, and seemingly to us with a good reason, that the rule which avoids a contract made in contravention of a statute, did not apply to statutes made for the protection of the revenue only, That the non-observance of excise regulations will not avoid a contract. in respect of their subject-matter, if it be not accompanied with fraud, although a penalty attaches. Johnson v. Hudson, 11 East, 180; Brown v. Duncan, 10 Barn. & Cress. 98; Hodgson v. Temple, 5 Taunt. 181. And that it was always to be applied, when the statute was made for the protection of the public from moral evils, or from those which we know from experience that society must be guarded from by preventive legislation. Such was received as the law by the courts in England and in our States, and cases were ruled in both accordingly; but afterwards, with only a few years intervening, Baron Parke, a distinguished judge, truly said, in Cope v. Rowland, (2 Cromp. Mee. & Ros. 157,) " Notwithstanding some dicta apparently to the contrary, if the contract be rendered illegal, it can make no difference, in point of law, whether the statute which has made it so has in view the protection of the revenue or any other object." Such we believe to be now the rule in England, but with many exceptions, made upon distinctions very difficult to be Understood consistently with the rule; so much so, that we have concluded, before the rule can be applied in any case of a statute prohibiting or enjoining things to be done, with a prohibition and a penalty, or a penalty only for doing a thing which it forbids, that the statute must be examined as a whole, to find out whether or not the makers of it meant that a contract in contravention of it should be void, or that it was not to be so. In other words, whatever may be the structure of the statute in respect to prohibition and penalty, or penalty alone, that it is not to be taken for granted that the legislature meant that contracts in contravention of it were to be void, in the sense that they were not to be enforced in a court of justice. In this way the principle of the rule is admitted, without at all lessening its force, though its absolute and unconditional application to every case is denied. It is true that a statute, containing a prohibition and a penalty, makes the act which it punishes unlawful, and the same may be implied from a penalty without a prohibition; but it does not follow that the unlawfulness of the act was meant by the legislature to avoid a contract made in contravehtion of it. When the statute is silent, and contains nothing from which the contrary can be properly inferred, a contract in contravention of it is void.
It is not necessary, however, that the reverse of that should be expressed in terms to exempt a contract from the rule. The exemption may be inferred from those rules of interpretation, to which, from the nature of legislation, all of it is liable when subjected to judicial scrutiny. That legislators do not think the rule one of universal obligation, or that, upon grounds of public policy it should always be applied, is very certain; For, in some statutes it is said in terms that such contracts are void; in others, that they are not so. In one statute, there is no prohibition expressed, arid only a penalty; in another, there is prohibition and penalty, in some of which, contracts in violation of them are void or not, according to the subject-matter and object of the statute; and there are other statutes in which there are penalties and prohibitions, in which contracts made in contravention of them will not be void, unless one of the parties to them practises a fraud upon the ignorance of the other. It must be obvious, from such diversities of legislation, that statutes forbidding or enjoining things to be done, with penalties accordingly, should always be fully examined, before courts should refuse to give aid to enforce contracts which are said to be in contravention of them.
We now turn to the case on hand, to apply to it our version of the rule and the manner of its application.
The statute relied upon by the defendant, to avoid the payment of his note, is that of June, 1822, (Hutch. Dig. 512.) He relies upon the fourth section, substantially recited in his special pleas, arid says the plaintiff cannot recover upon the note, as it was given for an illegal consideration, from the plaintiff's having failed, before he sold the negroes, to comply with the directions in the fourth section. The sixth section declares that both the seller and the buyer of such slaves shall pay one hundred dollars for every slave so sold or purchased. The two sections, considered conjunctively, seem to us to imply that the penalty only, without any other loss to either the seller or the buyer, was to be inflicted. The subject-matter and the sufficiency of the penalty relatively to the value of a slave,, to prevent the mischief against which the legislature meant t° guard, imply that the legislature did not mean that such a contract should not be enforced in a court of justice. Besides, as the act was meant to prevent convict negroes from being brought into the State for sale, and another penalty for that offence is to be inflicted, severer than that of the sixth section, without a forfeiture of the slave or any provision for his removal from the State, it cannot have been intended that the disregard of precautionary directions, for the importation of slaves for sale was to be visited with its penalty, and the indirect forfeiture by the. seller of the price of them, by denying to him the aid of courts to enforce a contract of sale for negroes who were not convicts. This statute must be interpreted as all other statutes are liable to be. The State's policy was to exclude all negroes tainted with crime. For aught. that appears in the pleadings, the defendant bargained for the negroes, knowing that they were brought into the State as he says they were. If, then, there was a violation of the law by his purchase, he stands in pari delicto with the seller, with this difference between them, that he' is now seeking to add to his breach of the law the injustice of retaining the negroes without paying for them. And he might do so if the statute was such as it is represented to be in his pleas. The law will not aid either of two parties who are in pari delicto in the violation of a statute. Whatever may be stated in a contract for an illegal purpose, a defendant, against wliom it is sought to be enforced, may, to prevent it, show both the turpitude of himself and the plaintiff. Lord Mansfield said, with a very proper sensibility of the injustice of such a plea, and of the policy which permits it to be insisted upon, " The objection, that a contract is immoral or illegal as between plaintiff and defendant, sounds' at all times very ill in the mouth of a defendant. It is not for his sake, however, that the objection is ever allowed, but it is founded on general principles of policy, which the defendant has the advantage of, contrary to ,'the real justice, as between him and the plaintiff." Such is the law, and the defendant would have the advantage if he had not mistaken the statute under which it is claimed.
It is a rule, if effects and consequences shall result from an interpretation of a statute contrary and in ópposition to the policy which it discloses, or substantially avoiding the infliction, of a penalty upon the transgressor, that such an interpretation must be rejected. In this ease, the interpretation contended for in behalf of the defendant does both. One of them has already been stated. It is, that it would lead to the infliction of a severer penalty for the disregard of the directions for buying slaves for sale who are not convicts, than the statute imposes upon those who shall bring convict slaves into the State.
Further, the penalty in the sixth section, upon such as do not comply with the directions in the fourth, is to be equally inflicted upon the buyer and the seller.
Make, then, this contract void, by the application of the rule pari delicto potior conditio est defendentis et possidentis, and the defendant, in the event of .his conviction for transgressing the statute, would be substantially released from the penalty as to all the objects for which punishment is ever inflicted; because, having the power to retain the negroes, he would pay the fine from their labor, or would get them for only so much less than he bargained to give for them. In other words, the seller, if convicted too, would pay his own and the buyer's fine. Again, as the rule is not allowed for the benefit of either party to an illegal contract, but altogether upon grounds of public policy, we do not think that public policy calls for the application of it in this case, as the defendant might keep the slaves which he bought from the plaintiff within the State of Mississippi, contrary to the law which forbade the sale of them.
Such decided advantages, to one of two who have violated q, statute by a contract, could not have been meant by the Legislature of Mississippi.
It is gratifying to us, that the conclusion at which we have arrived is sustained by the subsequent legislation of Mississippi. In 1837, (Hutch. Dig. 535,) an act was passed repealing the act permitting slaves to be brought into the State for sale. In addition/to the penalty, it is declared in terms that all contracts in contravention of it shall be void. There could not be, from statutes in pari materiá, especially in one repealing another and substituting new conditions and penalties upon the same subject-matter of both, a stronger circumstance to show, that under the first statute in order, contracts in violation of it-were not meant to be irrecoverable by suit. Our judgment in -this case is, that the contract is not void, and that the defendant can take nothing by his pleas.
We are .aware, that decisions have been made in the courts of Mississippi seemingly in conflict with this; but they are only so in appearance. None of them were made until after the constitution of Mississippi of 1817 had been superseded by that of 1832. We have said, more than once, and now say again, that the clause in the constitution of 1832, prohibiting the introduction of slaves into the State as merchandise, was inoperative to prevent it until the legislature acted upon it. We have read all that has been officially written in opposition to that conclusion without having our confidence in its correctness at all shaken.
We shall direct the reversal of the judgment in this case.
Mr. Justice McLBAN and Mr. Justice CURTIS dissented.
Order.
This cause came on to be heard on the transcript of the record, from the Circuit Court of the United States for the Southern District of Mississippi, and was argued by counsel. On consideration whereof, it is now here ordered and adjudged by this court, that the judgment of the said Circuit Court in this cause' be, "and the same is hereby, reversed, with costs; and that this cause be, and the same is hereby, remanded to the said Circuit Court, with directions for further proceedings to be had therein, in conformity to the opinion of this court.