Lesbian, gay, bisexual, transgender, and queer (LGBTQ) people in Malaysia face severe challenges not experienced by non-LGBTQ residents. Although same-sex identities alone are not criminalised under the law, the act of sodomy (anal sex) is a crime in the country, with laws enforced arbitrarily. Extrajudicial murders of LGBTQ people have also occurred in the country. There are no Malaysian laws that protect the LGBTQ community against discrimination and hate crimes. As such, the LGBTQ demographic in the country are hard to ascertain due to widespread fears from being ostracised and prosecuted, including violence.

In 2015, the Human Rights Watch (HRW) stated that "Discrimination against lesbian, gay, bisexual, and transgender (LGBT) people is pervasive in Malaysia." Over the years, there have also been cases of violence against individuals in Malaysia based on their sexual orientation, which has been tolerated by the state. Conversion therapy is practiced regularly in the country and is openly promoted by politicians and religious leaders. In 2023, the Global Trans Rights Index ranked Malaysia as the second worst country in the world in terms of transgender rights, only after Guyana.

With widespread anti-LGBTQ conversion therapy practices, discrimination, and violence in the country supported by the state, Malaysia is one of the most homophobic countries in the world. Social attitudes towards the LGBTQ community in the country are largely shaped by Islam, the official state religion of Malaysia, although a significant proportion of Malaysians of other religions such as Christianity also holds strong homophobic views. Since at least the 19th century, the mores of Malaysia have strongly disapproved of same-sex relationships and transitioning, which has shaped public policy. As a result, LGBTQ rights are not pursued by any political party.

History 19th and 20th centuries Malaysia retains its criminal ban on sodomy (anal sex or oral sex involving the penis) under Section 377A of the Penal Code, which was enacted in 1871 when it was under British colonial rule (British Malaya). It is broadly defined to include both heterosexual and homosexual acts, regardless of the gender of both parties involved, with possible punishments including fines, caning, and prison sentences of up to twenty years. Section 377D of the Penal Code also criminalises "act of gross indecency with another person" with up to two years imprisonment, which applies to both males and females since 1989. In addition to the secular law, Muslim citizens may also be charged in special Islamic courts, however non-Muslim are not subjected to Islamic law and the Islamic courts have no jurisdiction over non-Muslims, as enshrined in the Federal Constitution of Malaysia.

There has been some public discussion about reforming the law so as to exempt private, non-commercial sexual acts between consenting adults. Some members of the major opposition party have expressed support for such a reform, most notably Latheefa Koya, but this is not the official position of the party. No political party or elected member of the Parliament has formally proposed such a reform.

In 1975, a Malay Muslim transgender woman, Sari Kartina binti Abdul Karim (formerly named Mohd Fauzi bin Abdul Karim), who had undergone a sex reassingment surgery conducted by S.S. Ratnam at the Kandang Kerbau Hospital in Singapore back in October 1974, was allowed by the Johor Deputy Mufti Syed Alwee Abdullah to marry her husband Abdul Razak Othman in Johor Bahru and have their marriage recognised under sharia law. She also successfully changed her identity card with the National Registration Department, which recognised her as a female. Sari Kartina is considered to be the first ever transgender Malay and Muslim to be allowed to marry under the sharia law in Malaysia.

In 1982, the National Fatwa Committee issued a fatwa (religious edict) banning Muslims from undergoing sexual reassingment surgery, unless one is an intersex person. The fatwa reiterated that a person's sex is determined at birth and remains so even one has successfully undergone a sexual reassingment surgery. It also ruled that marriages involving transgender are invalid. However, this ruling is not legally binding as it was not gazetted under any law.

In 1993, Kelantan passed Syariah Criminal Code (II) Enactment 1993 that stipulated the implementation of hudud law, including for same-sex sexual acts. However, following backlash by Sisters in Islam and letter to then Prime Minister, Mahathir Mohammad, the code remains unenforceable. In 2015, Kelantan re-enacted this shariah criminal code so that non-Muslims are fully exempt from the law, however its provisions are still unenforceable due to the limits set by Act 355.

In 1994, the government banned anyone who is homosexual, bisexual or transsexual from appearing in state-controlled media.

In 1995, the Religious Affairs Minister of the state of Selangor praised the Islamic Badar vigilante groups, who had organised in 1994, to assist in the arrest of 7,000 individuals for engaging in "unIslamic" activities such as homosexuality.

21st century

In 2002, Terengganu passed Syariah Criminal Offenses (Hudud And Qisas) Enactment 2002 which stipulated the imposition of hudud law including for same-sex sexual acts, but this law remained unenforceable due to the limits set out by Act 355.

In 2005, the Royal Malaysian Navy (RMN) chief Mohd Anwar Mohd Nor stated that the Navy would never accept homosexuals.

In 2010, the Film Censorship Board of Malaysia announced it would only allow depiction of homosexual characters as long as the characters "repent" or "go straight" in the end.

In 2016, the High Court affirmed the right of a post-transition transgender man to reassign his gender on his national registration identity card. The judgement was however overturned on appeal the following year.

In 2017, Malaysia tried to censor Beauty and the Beast over some gay moments but eventually relented and let the movie be shown. The censorship board also had no objections to the screening of Power Rangers even with a lesbian scene in the movie.

In May 2017, the LGBTQ pride march organised by Taylor's University planned in June was cancelled due to Islamist pressure. The event was condemned by pro-Islamist blogs because it was disrespectful to do in the Islamic holy month of Ramadan.

In August 2018, a gay bar in the capital Kuala Lumpur was raided by police and religious enforcement officials, while in a separate incident, a transgender woman was beaten up by a group of assailants in Seremban, a town south of Kuala Lumpur. The minister in charge of Islamic affairs also came under fire from activists and other ruling party lawmakers, after he ordered the removal of portraits of two LGBTQ activists from an art exhibition.

In September 2018, two Muslim women were convicted by the Terengganu Shariah High Court for attempting to have lesbian sex in a car parked in public area, and were fined 3,300 Malaysian ringgit and caned six times in shariah-style caning before an audience in a courtroom of the Terengganu Shariah High Court. Prime Minister Mahathir Mohamad denounced the punishment, saying it "did not reflect the justice or compassion of Islam".

In November 2019, a shariah court found five Muslim men guilty for "attempting" gay sex, under section 28 of Selangor's sharia law, and they received fines, imprisonment and six strokes of the cane each. The five men were arrested during a 2018 raid on a private residence in Selangor, in which a total of 11 men were arrested.

In 2020, local rock band Bunkface stirred controversy over homophobic lyrics in their song Akhir Zaman ("The End of Times"). The lyrics urge the LGBT community to "go and die". The band issued a statement on Instagram on March 6, 2020, where they referred to the Quran to defend their anti-LGBT lyrics.

In 2021, one of the Muslim man who was arrested on sodomy charges under Selangor's shariah law in the November 2019 case filed a lawsuit against the state government of Selangor. Subsequently, the Federal Court of Malaysia declared that the Islamic provision banning gay sex in Selangor is unconstitutional, and any state laws within Malaysia can not be in conflict or override with clear federal laws banning gay sex.

In 2022, Malaysian authorities raided a Halloween party, arresting dozens of participants that were a part of the LGBTQ+ community. Numan Afifi, an LGBTQ rights activist who was among those arrested, referred to it as "outrageous state oppression".

In 2023, Malaysian authorities seized rainbow-coloured watches made by Swatch from its Pride collection. Eleven shopping malls with Swatch outlets around Malaysia, including in the capital Kuala Lumpur, were raided in May. However, on 24 June 2023, Swatch filed a lawsuit against the Malaysian government. On 25 November 2024, the Kuala Lumpur High Court ruled that the seizure conducted by the Home Ministry was illegal, as it was done without warrant and was carried out before the prohibition order was issued. The court subsequently ordered all 172 seized watches to be returned to Swatch, and all watches were eventually returned to Swatch by the Home Ministry on 9 December 2024.

In July 2023, English pop rock band The 1975 was forced by the organisers of Good Vibes Festival to prematurely end their performance after their lead vocalist Matty Healy criticised the country's widespread anti-LGBTQ laws and kissed bandmate Ross MacDonald. Healy added that they initially did not want to visit Malaysia, stating that "I made a mistake. When we were booking shows, I wasn't looking into it," he said. "I don't see the fucking point... of inviting The 1975 to a country and then telling us who we can have sex with." Human rights and LGBTQ activist Peter Tatchell, writing for The Guardian wrote that criticism of Healy and the band "deflect attention from where the criticisms should be most urgently directed: against the homophobia of the Kuala Lumpur regime." He also expressed that Healy is no white saviour for showing solidarity to the community as "queer rights are a universal human right, not a western one". That same month, 8 individuals were arrested by the police in Kuala Lumpur for staging a demonstration supporting LGBTQ rights.

In February 2024, the Federal Court of Malaysia in Nik Elin Zurina bt Nik Abdul Rashid & Anor v. Kerajaan Negeri Kelantan, struck down 16 Sharia-based Kelantan state laws; parts of which covered incest, sodomy, and cross-dressing. However, this ruling does not affect anti-LGBTQ laws at the federal level.

In November 2024, the Kelantan state approved its amendments to its entertainment law, banning entertainment activities that promote or contain unethical elements, such as supporting LGBTQ behaviour.

In February 2026, the Malaysian Communications and Multimedia Commission (MCMC) blocked access to the websites of same-sex dating platforms Grindr and Blued. In a written response to the Parliament of Malaysia, Communications Minister Fahmi Fadzil clarified that while the web-based versions were restricted immediately, the government was still evaluating legal measures to remove the mobile applications from the Apple App Store and Google Play Store in Malaysia.

In June 2026, Deputy Minister for Religious Affairs Marhamah Rosli said it was now the government's official position to urge the public to say “budaya songsang” (“perverted/deviant culture”) instead of "LGBT."

Legislation prohibiting or restricting LGBTQ

Federal criminal law