The man who invented homosexuality was a libertarian. (I use the term in the classical sense, not the Rand Paul conservatarian sense.)
Before I explain, here is some history.
The first active campaign for extending equal rights before the law to homosexuals took place in the mid- to late-1800s in what is now Germany. At the center of the campaign was a small classical liberal publishing house in Leipzig, Serbe Verlag, which published the works of Karl Ulrichs (1825-1895) and Karl-Maria Kertbeny (1824-1882).
As Germany moved from a loose confederation of states into a nation-state, a debate about laws banning same-sex relationships took place. Some states had followed the more liberal Napoleonic code, but other state laws were quite severe. Ulrichs and Kertbeny were concerned that the more repressive Prussian code would be imposed on all states and began agitating against the move.
Kertbeny's first booklet on gay rights was published in 1869 and entitled, "Paragraph 143 of the Prussian Penal Code." This law was the anti-homosexual law, which ultimately morphed in the infamous Paragraph 175, the law under which Nazis rounded-up gay men.
Kertbeny's role in fighting for gay rights is rarely mentioned. His one lasting legacy was that he was the man who invented homosexuality, or to be more precise, the one who coined the terms "homosexual" and "heterosexual." Kertbeny felt that the common phrases of the day were unfairly pejorative and wanted more neutral terms. Ulrichs tried to coin a new term as well, "Urnings" or "Uranians," neither of which, thankfully, caught on.
Prof. Robert Tobin says Kertbeny's role in founding gay rights is overlooked and scholars rarely mention him beyond noting his coining of these terms. The reason, says Tobin, is Kertbeny's "publications are difficult to find, not often collected by libraries or reprinted, and even more rarely translated into English."
Hungarian sociologist Judit Takacs, wrote that Kertbeny became friends with libertarian theorist Alexander Humboldt, when living in Berlin in 1848. Humboldt, it is believed, was gay himself, though this has yet to be proven. Certainly Kertbeny's arguments were typically classical liberal. He argued governmental functions do not include policing of private affairs, unless the rights of others are infringed. Tobin says Kertbeny fought for gay rights using classical liberal ideas and was himself a firm liberal in the libertarian tradition. "As a liberal, Kertbeny argues for a strictly secular state" and denounced:
"...sodomy laws as carry-overs from the days when canon law concerned itself with 'original sin, the devil, and witches.' Instead, Kertbeny hopes the new German nation will be a "modern constitutional state" [Rechtsstaat], 'the strict opposite of the theocratic-hierarchical autocratic state [Pflichstaat] of feudalism.' A classical liberal, Kertbeny argues that the constitutional state's only duty is 'to protect the rights of its citizens.' According to Kertbeny , 'the constitutional state is only concerned with questions of sexuality insofar as the rights of others are infringed upon.' To back up his point, Kertbeny cites a series of liberal legal theorists including: Johann Jacob Cella, who had argued in 1787 that the law should only punish carnal crimes if they hurt others; Jean-Jacques-Régis de Cambacérès, who had moved forward Napoleon's liberal legal code; and Anselm von Feuerbach, who had attempted to distinguish between things that were immoral, like witchcraft, heresy, blasphemy and sodomy, and things that were illegal, like murder or rape, when he reworked Bavaria's penal code in 1813."
Kertbeny extolled the virtue of the "equality of legal rights of life." Tobin writes that, "In the tradition of classical liberalism, Kertbeny generally envisions the right to sexuality negatively--that is to say, he argues that the state should stay out of the bedroom and should not impinge on the sexual freedom of his new category of homosexuals. As he remarks, the liberal state does not meddle uninvited in bad marriages, unless someone is being harmed--what should it interfere in 'the possible relationship between man and man?'"
According to Takacs, Kertbeny and Ulrichs corresponded often between 1864 and 1868 and for Kertbeny "the main issues was not whether same-sex attraction be innate or not, but that people ought to have the right to be left alone by the state in their intimate lives."
While Kertbeny did believe sexual orientation was innate, he thought where rights were concerned it didn't matter either way. He wrote Ulrichs, that regardless of whether sexual orientation was "innate or voluntary" the "state does not have the right to intervene in what is happening between consenting people."