Short answer. They are forfeited to the State. Article 1770 requires a partnership to have a lawful object, and provides that when an unlawful partnership is dissolved by judicial decree, the profits shall be confiscated in favor of the State. The partners cannot sue each other to divide gains the law will not let them keep.
What the law says
When an unlawful partnership is dissolved by a judicial decree, the profits shall be confiscated in favor of the State, without prejudice to the provisions of the Penal Code governing the confiscation of the instruments and effects of a crime.
Civil Code, Article 1770 — Lawful Object. Read the full provision →
A partnership must be lawful
Article 1770 begins with a requirement and ends with a consequence. The requirement: a partnership must have a lawful object or purpose, and must be established for the common benefit or interest of the partners. A venture set up to do something the law forbids — smuggling, an illegal lending scheme, trading in what may not be traded — is an unlawful partnership, and the law will not lend its machinery to enforcing the bargain among the partners. The point is not merely that such a partnership is unenforceable; the State actively strips it of what it produced, rather than leaving the partners to sort out their shares.
The profits go to the State
The consequence is the striking part: when an unlawful partnership is dissolved by a judicial decree, the profits shall be confiscated in favor of the State. Two things follow. First, forfeiture attaches to the profits — the gains the unlawful venture generated — which the partners therefore cannot claim from one another. Second, it operates on a judicial dissolution, so it is a court that decrees the partnership unlawful and orders the confiscation, not a matter the partners arrange between themselves. A partner who sues to recover his share of an illegal enterprise's earnings does not merely lose; he directs the court to profits it will hand to the government.
The criminal overlay
The article forfeits profits; it does not, in its own terms, confiscate the partners' contributed capital, since what it names is the gains the venture earned. But that is not the end of the exposure. Article 1770 preserves the reach of the criminal law: the confiscation operates without prejudice to the provisions of the Penal Code governing the confiscation of the instruments and effects of a crime. So where the unlawful purpose is itself a crime, the tools and proceeds of that crime can be confiscated under the penal rules on top of the civil forfeiture here.
Why it matters before you go in
The practical lesson is at the front end, not the courtroom. Because the law forfeits the gains of an unlawful partnership and lends no help in dividing them, there is no safe way to enforce your stake in a venture whose object is illegal — the more successful it was, the more there is for the State to take. If a would-be partner is asked to put money into something that skirts the law, the risk is not only losing the investment but seeing the profits confiscated and, where a crime is involved, facing the penal consequences besides. Check that the object is lawful before you commit.