Democratic donor Ed Buck was hit Thursday with a federal charge in connection to the 2017 overdose death of a man at his West Hollywood home — and newly released court documents detail allegations that painted Buck as a sex fiend with an underwear fetish who solicited men and injected them with meth during sexual encounters.

The feds charged Buck, 65, with one count of distribution of methamphetamine resulting in the overdose death of 26-year-old Gemmel Moore. Buck faces up to life in prison, if convicted.

Moore, a homeless prostitute, had suffered a fatal crystal meth overdose in Buck’s home on July 27, 2017. He was found unresponsive and naked, wearing on white socks, on a mattress on the living room floor of Buck’s home by police, according to a federal criminal complaint filed in the US District Court for the Central District of California.

“Witnesses who knew Moore told law enforcement officers that Buck paid Moore in money and drugs in exchange for Moore to engage in sexual activities with Buck,” an affidavit by Drug Enforcement Administration Task Force Officer John Mundell says.

Moore, who had been living in Texas at the time of his death, was flown out to Los Angeles by Buck.

Days before his death, he texted Buck a photograph of a crotch area and stated, “Gemmel your master slave” to which Buck responded “Or slave master,” according to the affidavit.

Moore’s mother told investigators in August 2017 that in 2016, Moore, who was living in Los Angeles at the time, called her “and said that a rich and powerful man named Ed Buck held Moore against his will and shot him up with drugs,” the affidavit says.

Moore’ aunt also told investigators that Moore had told her “Buck used to inject Moore with drugs and would do ‘horrible things’ to him,” according to the affidavit.

Investigators found at least 10 alleged victims who say they were paid by Buck to engage in sexual activities and use drugs, according to the court documents.

The wealthy activist was arrested Tuesday on state charges related to the non-fatal overdose of an unidentified 37-year-old man, who fled Buck’s home and later told police Buck had administered “two dangerously large doses of methamphetamine” on Sept. 11.

During his Buck’s first court appearance in the state case Thursday, he was held on $4 million bond.

Buck initially dodged criminal charges in Moore’s death, as well as in the fatal meth overdose of another man, Timothy Dean, 55, who died in January at Buck’s home.

US Attorney Nick Hanna on Thursday said Buck preyed on homeless and other vulnerable men and is a “serious threat to public safety.”

According to the federal affidavit, one man, only identified as “Victim 10” said that Buck solicited him to engaged in sexual activities and distributed meth to him “nearly every day” during a roughly one month period from July 29 to Sept. 6 while he was living at Buck’s home.

“According to Victim 10, Buck intravenously injected methamphetamine into Victim 10 on September 4 and September 11, 2019, which caused Victim 10 to suffer overdose effects, requiring him to be transported to the hospital. Victim 10 was subsequently released from the hospital after each encounter,” the affidavit says.

The affidavit states how several of the alleged victims met Buck through the gay dating site Adam4Adam, including “Victim 3” who Buck offered $800 to $1,000 to “party and play” with cocaine in 2017.

“Buck dressed Victim 3 in white undergarments and pleasured himself while he stared at Victim 3’s bulge in the white undergarments. Victim 3 reported that Buck took photographs of him during their first encounter,” the court documents say.

“Victim 5” told investigators that he went to Buck’s place on April 24 to engage in sexual activities in exchange for money and marijuana.

“Buck asked Victim 5 if Buck could blow methamphetamine smoke on Victim 5’s penis, but Victim 5 said no. Buck told Victim 5 that he had a strong underwear fetish and asked Victim 5 to put on a pair, which Victim 5 did,” the affidavit says, which added that “Buck showed Victim 5 videos of Moore who appeared to Victim 5 to be scared.”

According to the affidavit, “Victim 6” said he had two encounters with Buck in 2011.

“During their first meeting at Buck’s residence, Buck gave Victim 6 $60 in cash and a baggie of methamphetamine in exchange for sex,” the affidavit says. “Victim 6 stated that it was part of Buck’s role-playing and fantasy to inject people with methamphetamine.”

The man told investigators that he agreed to do a small dose of meth, but instead Buck “emptied an entire syringe on him,” the affidavit says.

According to the court documents, Buck asked the man to put on white underwear and a jockstrap and placed a tight sex toy on his penis before he eventually lost consciousness.

“During the second meeting at Buck’s residence, Buck again injected Victim 6 with a large quantity of methamphetamine. Victim 6 instantly lost consciousness, and when he awoke, he felt pain in his anus and saw that it was bleeding. A third unidentified man was recording Victim 6,” the court documents say, adding that Buck paid the victim with $100 and a bag of meth.

“Victim 7,” an escort, said he met Buck in 2018 through Adam4Adam, and while at Buck’s residence he said he injected himself with what Buck told him was methamphetamine, and then could not move for up to seven hours.

He told investigators he believed he was given “some sort of tranquilizer” and at one point Buck wanted him to leave, but he couldn’t and “Buck then became frustrated and obtained a power saw from a closet, turned it on, and approached Victim 7 with it,” the affidavit says.

“Victim 7 said that he got an Adrenalin rush and was able to stand up and go to the kitchen.”

The man said that when he regained his ability to speak, Buck refused to pay him, but eventually did.

“Victim 8” told investigators that Buck would pay him in cash and marijuana to engage in sexual activities with Buck, which including wearing white underwear for him, the affidavit says.

During one occasion, the man said that Buck gave him what he thought was vodka, but after drinking it, he fell asleep.

“Victim 8 stated that when he woke up, Buck was injecting Victim 8 with a drug via syringe,” prompting the man to panic, according to the court documents.

When “Victim 8” tried to get up, he could not move and “stated that his underwear was pulled down and he felt excruciating pain in his anus, which was bleeding,” the affidavit said.

“There were metal clips fastened to his nipples, and when he tried unsuccessfully to remove them, Buck laughed and whispered to him,” according to the court documents.

With Post wires