The doctrine of illegality is a fundamental principle of contract law in Malaysia, providing that agreements tainted by unlawfulness are void and unenforceable. The primary statutory basis is Section 24 of the Contracts Act 1950 (CA 1950), which renders void every agreement whose object or consideration is unlawful.
Section 24 of the Contracts Act 1950
Section 24 of the CA 1950 provides that the consideration or object of an agreement is unlawful if: (a) it is forbidden by law; (b) it is of such a nature that, if permitted, it would defeat any law; (c) it is fraudulent; (d) it involves or implies injury to the person or property of another; or (e) the court regards it as immoral or opposed to public policy. Every agreement of which the object or consideration falls within these categories is void.
Statutory Illegality vs Illegality at Common Law
The distinction between statutory illegality and illegality at common law was authoritatively addressed in Pang Mun Chung & Anor v Cheong Huey Charn [2018] 8 CLJ 663, where Harmindar Singh Dhaliwal JCA explained that while statutory illegality arises from non-compliance with enacted law, illegality at common law must be grounded upon established heads of public policy, also embodied in Section 24(e) of the CA 1950. The Federal Court in Detik Ria Sdn Bhd v Prudential Corporation Holdings Ltd & Anor [2025] 4 CLJ 159 further clarified that, unlike English law which is governed by common law principles, the determination of illegality in Malaysia is, to a large extent, a question of statutory construction under Section 24 of the CA 1950.
Manner in Which Illegality May Affect a Contract
In Yango Pastoral Co Pty Ltd & Ors v First Chicago Aust Ltd & Ors [1977-1978] 139 CLR 410, the court identified four ways in which illegality may affect a contract: first, where the contract is to do something which the statute forbids; second, where the contract is one which the statute expressly or impliedly prohibits; third, where the contract, although lawful on its face, is made in order to effect a purpose which the statute renders unlawful; and fourth, where the contract, although lawful according to its own terms, is performed in a manner which the statute prohibits.
Non-Compliance Does Not Automatically Render an Agreement Illegal
A critical qualification is that non-compliance with a statutory provision does not necessarily render an agreement illegal. In Liputan Simfoni Sdn Bhd v Pembangunan Orkid Desa Sdn Bhd [2019] 1 CLJ 183, the Federal Court held that non-compliance with the Stamp Act 1949 and the Real Property Gains Tax Act 1976 did not render a sale and purchase agreement illegal. This principle was reaffirmed in Golden Wheel Credit Sdn Bhd v Dato’ Siah Teong Din [2025] 10 CLJ, where the Court of Appeal held that the High Court had erred in finding moneylending agreements illegal solely on the basis of non-compliance with the Moneylenders Act 1951, as the Act itself did not expressly state that such non-compliance renders the agreements illegal. The court allowed the appeal and ordered restitution of the sum of RM3,383,500.00.
Void by Statute: Unlawful Object or Consideration
In Triple Zest Trading & Suppliers & Ors v Applied Business Technologies Sdn Bhd [2023] 10 CLJ 187, the Federal court confirmed that an agreement is also void by statute where the object or consideration falls within the categories prescribed under Section 24 of the CA 1950. The court reiterated that once any of the prohibited categories is engaged, the agreement is void in its entirety.
Court’s Duty to Raise Illegality Ex Proprio Motu
A significant principle underscored in Pembinaan Jaya Zira Sdn Bhd v Sungai Lui Construction & Development Sdn Bhd [2026] 3 CLJ is that courts are duty-bound to raise illegality on their own motion (ex proprio motu), even if illegality has not been specifically pleaded. No court may, with knowledge, lend its aid to enforce an unlawful agreement: Keng Soon Finance Bhd v MK Retnam Holdings Sdn Bhd & Anor [1989] 1 CLJ 897. Courts are bound at all stages to take notice of illegality, whether apparent on the face of the matter or emerging subsequently: Merong Mahawangsa Sdn Bhd & Anor v Dato’ Shazryl Eskay Abdullah [2015] 8 CLJ 212.
Conclusion
The doctrine of illegality under Section 24 of the CA 1950 operates as a firm boundary on contractual freedom in Malaysia. An agreement whose object or consideration falls within the prohibited categories is void, regardless of the parties’ intentions. Crucially, while statutory non-compliance may render an agreement void or unenforceable, it does not automatically make it illegal unless the statute expressly or impliedly so provides. The courts remain vigilant gatekeepers, empowered and obliged to raise illegality at any stage of proceedings.