His Facebook post had said he would "pay $5,000 per hair obtained from Hillary Clinton".
US District Judge Kiyo Matsumoto ruled on Wednesday that Shkreli's post on September 4 showed he posed a danger to the public.
Shkreli was scheduled to be sentenced on January 16, 2018 on three counts of fraud stemming from his management of a hedge fund, and now he will likely remain in federal custody until then. "I understand now, that some may have read my comments about Mrs. Clinton as threatening, when that was never my intention when making those comments", Shkreli said in an earlier letter to the judge. "That is a solicitation to assault in exchange for money", the judge said. Sorry you didn't get Hillary Clinton's hair for whatever perverted reason you wanted it, but I hope you enjoy your new home behind bars.
That led a Brooklyn magistrate to announce she was reluctant to send female defendants to the jail, saying, "Some of these conditions wouldn't surprise me if we were dealing with a prison in Turkey or a Third World country".
But prosecutors noted that the Secret Service took his comments seriously enough to increase Clinton's security and they noted Shkreli could not guarantee that one of his followers, seeking the $US5,000 payoff, fame or just Shkreli's approval, might not act on his behalf.
Prosecutors said the posting prompted the Secret Service to use more resources, because it ran the risk that many of Shkreli's social media followers would think he was serious.
Shkreli had tried to pass off the post as satire, and he quickly deleted it shortly after it was published.
Shkreli's attorney called his client's conduct "stupid" but begged the judge to give him another chance.
"What's amusing about that", Matsumoto responded.
It was, they noted, not the first time that Shkreli had made inflammatory posts on social media.
"His bail was revoked and he was remanded to a detention facility", said Tyler Daniels, spokesman for the US Attorney's office in Brooklyn.
Shkreli's lawyers, meanwhile, compared his online comments to the political humor of Kathy Griffin, who held up a photograph of a faux bloody head of President Donald Trump and even Trump himself. He faces up to 20 years in prison.