Lesbian, gay, bisexual, transgender (LGBT) rights in Scotland are generally in line with the rest of the United Kingdom, which have evolved extensively over time and are now regarded as some of the most progressive in Europe. In both 2015 and 2016, Scotland was recognised as the "best country in Europe for LGBTI legal equality".

Same-sex sexual activity has been legal since 1981 and the age of consent has been equal to that for opposite-sex activity since 2001, at 16. A same-sex marriage law was approved by the Scottish Parliament in February 2014 and received royal assent on 12 March 2014. It came into effect on 16 December 2014 with many civil partners converting their relationships into marriages, while the first same-sex marriage ceremonies occurred on 31 December 2014. Civil partnerships for same-sex couples have been legal since 2005. Same-sex couples have also been granted joint and stepchild adoption rights since 2009 and discrimination on the basis of sexual orientation and gender identity has been banned since 2010.

LGBT rights in Scotland

Laws regarding same-sex sexual activity

The historical legal situation for male homosexuality was severe: "The common law crime of sodomy does not involve the establishment of the absence of consent on the part of the passive agent or catamite. It reflects a former general disapproval of homosexuality and both parties are guilty of the offence". Recorded punishments are limited compared to purges such as the Utrecht sodomy trials, whether due to lack of offending, prosecution or surviving documentation. Baron Hume wrote that "the crime is only mentioned twice in the course of our records", citing a double prosecution in 1570 and a single prosecution in 1630, with bestiality more often noted, all cases being punished by death. A legal text dated 1832 added a then recent case in which a man, on confession to two acts of sodomy out of nine initially charged, was transported for life. However, another archive source documents an additional sample mention, the commission for the trial of Gavin Bell in 1645.

LGBT rights in Scotland

In 1889, Scotland became the last jurisdiction in Europe to abolish the death penalty for same-sex sexual intercourse, which reduced the penalty to life imprisonment in a penitentiary.

LGBT rights in Scotland

The United Kingdom Parliament voted to pass the Sexual Offences Act 1967 for the limited decriminalisation of homosexual acts in only England and Wales. Homosexual activities were legalised in Scotland — on the same basis as that which was used for the 1967 Act – by Section 80 of the Criminal Justice (Scotland) Act 1980 (), which came into force on 1 February 1981. Section 2A, the legislation that prevented the promotion of homosexuality, was repealed in Scotland within the first two years of the existence of the Scottish Parliament by the Ethical Standards in Public Life etc. (Scotland) Act 2000.

In June 2018, the Scottish Parliament passed the Historical Sexual Offences (Pardons and Disregards) Act 2018, a law which issued a formal pardon to men, living and dead, convicted of having consensual sex with other men before it was decriminalised. Though the pardons are purely symbolic, the law also allows for anyone with a historical conviction for same-sex sexual activity to apply for a formal "disregard". If an application for a disregard is accepted by the relevant minister, this prevents the information from being included in disclosure checks and treats the offence as having not occurred. The law went into effect in October 2019.

Recognition of same-sex relationships

Civil partnerships

Civil partnerships have been a right of same-sex couples in Scotland to access since 2005, when the UK Parliament passed the Civil Partnership Act 2004. The Act gives same-sex couples most (but not all) of the rights and responsibilities of civil marriage. Civil partners are entitled to the same property rights as married opposite-sex couples, the same exemption as married couples on inheritance tax, social security and pension benefits, and also the ability to get parental responsibility for a partner's children, as well as responsibility for reasonable maintenance of one's partner and their children, tenancy rights, full life insurance recognition, next of kin rights in hospitals, and others. There is a formal process for dissolving partnerships akin to divorce.

Since November 2015, civil partnerships originating elsewhere in the United Kingdom other than Scotland (including Northern Ireland) can be converted to a marriage without the couple being forced to dissolve the civil partnership.