Martin Shkreli, former drug company CEO and convicted felon, apologized Monday for posting he would "pay $5,000 per hair" from Hillary Clinton during her book tour of What Happened.

"I want to personally apologize to this Court and my lawyers for the aggravation that my recent postings have caused," Shkreli wrote in a letter to the judge overseeing his case, filed with the court Monday.

"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. I used poor judgment but never intended to cause alarm or promote any act of violence whatsoever," he added.

Shkreli originally posted on Facebook, "Will pay $5,000 per hair obtained from Hillary Clinton after the sequence matches. Good luck, patrollers." That post was later deleted.

In response, a court motion filed in New York last week on Thursday revealed federal prosecutors called on a judge to remove Shkreli's $5 million bond and place him behind bars for dangerous public conduct, due to his comments.

Prosecutors said this incident demonstrated Shkreli was unable to meet his post-trial burden and that he does pose danger to the community.

Shkreli later posted on Facebook that he was joking and responded to the prosecutors' request by saying "F--- the government!"

Shkreli was convicted in August on several counts of securities fraud for lying to investors about his failing hedge fund. He also was convicted on one count of conspiracy to commit securities fraud.

Shkreli, former CEO of Turing Pharmaceuticals, gained infamy for increasing the prices of Daraprim, a life-saving drug used by HIV patients, from $13.50 to $750 per pill.