When Alan Turing’s caretaker entered the house of the famous mathematician in Wilmslow, Cheshire, England on 8 June 1954, he found Turing lying dead on the floor, a half-eaten apple beside him. The man who once helped defeat the Nazis by decoding the ENIGMA machine, found no other solution than to end his life willfully by cyanide poisoning, after he’d undergone years of forced hormonal treatment.
What had happened in those ten years between saving the world and deciding to commit suicide?
The first to know about his homosexuality was his fiancee Joan Clarke. He had proposed to her in 1941, but never fulfilled his promise of marrying her. After the bold move of coming out, he started a relationship with Arnold Murray in January 1952. Shortly after burglars broke into his house.
In the crime investigation that followed, he admitted having an affair with the 19-year-old Murray. The burglary wasn’t important anymore. Immediately the officers turned to his sexuality and both Turing and Murray were charged with gross indecency following Section 11 of the Criminal Law Amendment Act 1885 which stated homosexuality to be a more criminal offence than the act of housebreaking.
In the case Regina v. Turing and Murray Turing’s brother and solicitor advised to enter a guilty plea. The option for the sentence he was given lay between imprisonment and probation. He choose the later, thus, in the next two years, he had to undergo hormonal treatment to reduce his libido. The synthetic estrogen damaged his body and soul, causing gynaecomastia and impotence.
He found no other way than to kill himself.
No matter how famous or important Turing seemed for recent world history, his homosexuality overshadowed his reputation — even destroyed it in the face of society.
In 1954, New York literature Beatnik Allen Ginsberg met Peter Orlovsky, with whom he maintained a relationship until his death in 1997. He’d came out early in his life. In addition to being drawn to communism, and after Howl had been banned for obscenity in 1956, he felt more at ease moving to Paris and India. Not even colorful and pre-Hippie San Francisco felt safe to live the life he wanted.
At that time, Senator Joseph McCarthy not only engaged in a hunt for communism, but also stated gay men to be “perhaps as dangerous as the actual Communists.”  Until 1953, the Truman administration purged and fired 425 employees for allegations of homosexuality. 1950s politics were on a blood rush for hunting down homosexual men, for even the head of the FBI, J. Edgar Hoover, was eager to cleanse the State Department of gays.
President Dwight D. Eisenhower signed Executive Order 10450 as soon as he sat in the Oval Office in 1953. It banned homosexuals from working in federal government. Up to 5,000 gays and lesbians lost their jobs in federal employment, and were forced out of the closet, thus destroying their public lives. Only in 1995 did President Bill Clinton abolish Order 10450.
Why were communists and homosexuals seen as equally dangerous to American moral and politics, besides — as in Ginsberg’s case — coincidentally feeling drawn more to the left side of political, societal, and artistic activism?
McCarthy declared homosexuality to be a threat to the American Way of Life, putting sexuality on the same level as a political orientation: both seemed to share ideals of antitheism, rejected bourgeois culture and middle-class morality, lacked conformity, were considered scheming and manipulative. Senator Kenneth Wherry put it in a nutshell: “You can’t hardly separate homosexuals from subversives. I say, let’s get these fellows out of the government.” 
For example, in their eyes, it was a lucky coincidence that, Harry Hay, the founder of the LGBT rights organization, The Mattachine Society, was in fact a communist. But Hay’s sexual orientation and his LGBT activism were also a thorn in the side of the communist Party; which resulted in his expulsion for security measures.
The gay purge of McCarthy era became known as the Lavender scare. Alan K. Simpson, U.S. Senator from 1979 to 1997, later wrote: “The so-called ‘Red Scare’ has been the main focus of most historians of that period of time. A lesser-known element… and one that harmed far more people was the witch-hunt McCarthy and others conducted against homosexuals.” 
 Lerner, Max, The Unfinished Country: A Book of American SymbolsSimon and Schuster, 1959. pp 313-316.
 Simpson, Alan K.; McDaniel, Rodger (2013). “Prologue”. Dying for Joe McCarthy’s Sins: The Suicide of Wyoming Senator Lester Hunt. WordsWorth Press.