Malaysia header image
Index Malaysia Main Shop

Sexual Conduct Law — Malaysia

Legal framework, penalties, and historical context (updated August 2025). This page is informational and not legal advice.

Key takeaways

Consensual adult conduct

  • Sex outside marriage: not a Penal Code offence; for Muslims, zina (illicit sex) and khalwat (close proximity) are Syariah offences in many states (penalties capped by federal law at 3 years, RM5,000, 6 strokes)[SUHAKAM].
  • Same‑sex relations: illegal under Penal Code s377A/B (“carnal intercourse against the order of nature”) with possible whipping; overlapping state provisions have been curtailed by federal courts since 2021 and again in 2024[HDT], [Kelantan ruling].
  • Marital rape: not expressly criminalized; s375A punishes a husband who causes hurt or fear to obtain intercourse (up to 5 years)[BurgieLaw].

Sex work & related offences

  • Penal Code targets the ecosystem: brothels (s373), living on earnings/acting as intermediary (s372A), procurement/trafficking (s372)[NSWP].
  • Local bylaws address soliciting; trafficking law (Act 670) applies in severe cases. Selling sex per se is not the labelled offence; facilitation/exploitation is.

Sexual offences & minors

  • Sex with a girl under 16 is statutory rape even with consent (Penal Code), carrying long prison terms and whipping[WCC].
  • The Sexual Offences Against Children Act 2017 (SOACA) adds grooming and child‑pornography crimes with heavy penalties[SOACA].

“Old punishments” today?

Caning (whipping) remains lawful and is used under both the Penal Code and Syariah (for Muslims). Stoning is not a Malaysian court punishment[HDT].

Federal Penal Code — core provisions

Rape & statutory rape (s375/376)

The Penal Code defines rape in section 375 and prescribes penalties in section 376. Sex with a girl under 16 is rape even with consent; aggravated cases attract long prison terms and whipping[WCC].

“Statutory rape… [below 16] … imprisonment minimum 10 years, maximum 30 years and whipping.”[WCC]

Marital rape gap (s375A)

Malaysia does not criminalize marital rape per se. Instead, s375A punishes a husband who causes hurt or fear of death/hurt to obtain sex (up to 5 years)—criticized as inadequate relative to rape penalties[BurgieLaw].

“Unnatural offences” (s377A/B/D)

Sections 377A & 377B criminalize “carnal intercourse against the order of nature” (anal/oral sex), with penalties up to 20 years and whipping; s377D covers “gross indecency.” These underpin criminalization of consensual same‑sex intimacy under federal law[HDT].

Pornography & obscenity (s292; Film Censorship Act; CMA)

It is a crime to produce, sell, or distribute obscene material (Penal Code s292), and online dissemination of obscene/indecent content can be charged under the Communications & Multimedia Act (s211/233); the Film Censorship Act also penalizes obscene/indecent media[CMA/Film].

Syariah offences (Muslims only) & punishments

Each state enacts Syariah criminal offences (e.g., zina, khalwat, “against nature”, gender‑expression rules). Punishments are capped by federal law at 3 years’ jail, RM5,000 fine, and 6 strokes in any combination (the “3‑5‑6” cap)[SUHAKAM].

Sex work & related offences

Malaysia criminalizes the ecosystem of prostitution rather than the act of selling sex by an adult. Offences include exploiting a person for prostitution (s372), living on earnings/acting as intermediary (s372A), and keeping/managing a brothel (s373)[NSWP].

Penalties overview (selected)

OffenceIndicative penaltyNotes
Rape / statutory rape (Penal Code) Long imprisonment; whipping for many categories Sex with girl <16 = rape even with consent[WCC]
“Unnatural offences” (s377A/B) Up to 20 years + whipping Anal/oral sex; basis for criminalizing same‑sex intimacy[HDT]
Pornography / obscene materials Up to 3 years or fine (s292); other media/cyber laws apply Film Censorship Act; CMA s211/233 for online[CMA/Film]
Prostitution ecosystem (s372–373) Custodial terms and fines Brothels, procuring, living on earnings criminalized[NSWP]
Syariah offences (Muslims) Max 3 yrs, RM5,000, 6 strokes (cap) Public canings reported (Terengganu 2018; 2024)[2018], [2024]

What is not a crime (federal)

“Old punishments” still applied today?

Malaysia does not use stoning or amputation in its courts. However, caning (whipping) remains lawful and is used under both the Penal Code and Syariah. Notably, Syariah public canings have taken place—e.g., the 2018 Terengganu case of two women convicted for lesbian sex and the Dec 27, 2024 public caning for khalwat in Terengganu[2018], [2024].

In Feb 2024, the Federal Court invalidated 16 Kelantan Syariah offences (including sodomy and sexual harassment) for encroaching on federal criminal law—reinforcing constitutional limits on state criminalization[Kelantan ruling].

Quoted snippets

377A. Any person who has sexual connection with another person by the introduction of the penis into the anus or mouth of the other person is said to commit carnal intercourse against the order of nature.”[BurgieLaw]
375A… any man who… causes hurt or fear of death or hurt… in order to have sexual intercourse with his wife shall be punished with imprisonment… [up to 5 years].”[BurgieLaw]
SUHAKAM: “Syariah courts are empowered to impose maximum sentences of imprisonment not exceeding three years, any fine not exceeding RM5,000, or with whipping not exceeding six strokes or with any combination thereof.”[SUHAKAM]

References

Human Dignity Trust. (2024, Dec 17). Malaysia country profile (Penal Code s377A/B/D; penalties incl. whipping).

BurgieLaw. (n.d.). Penal Code s375 (rape); s375A (husband causing hurt); s377A (texts).

Women’s Centre for Change (WCC) Penang. (n.d.). Rape laws in Malaysia (statutory rape penalties, whipping).

NSWP & Laws of Malaysia (Act 574). (2012–2024). Malaysia: prostitution‑related offences (s372–373).

SUHAKAM. (2021). Press Statement on Act 355 (Syariah court “3‑5‑6” cap).

Reuters. (2024, Feb 9). Top court voids 16 Kelantan Syariah crimes.

Reuters. (2024, Dec 27). Public caning for khalwat in Terengganu.

Al Jazeera / ABC News. (2018, Sept 3–4). Two women caned for lesbian act.

Thomas Philip; Malaysian Bar; CMA. (2018–2024). Obscenity & cyber provisions (Penal Code s292; CMA s211/233; Film Censorship Act).

Sexual Offences Against Children Act 2017 (Act 792). (2017). Official text (English).