NEW YORK — A boyish-looking entrepreneur who became the new face of corporate greed when he jacked up the price of a lifesaving drug fiftyfold was led away in handcuffs by the FBI on unrelated fraud charges Thursday in a scene that left more than a few Americans positively gleeful.

Martin Shkreli, a 32-year-old former hedge fund manager and relentless self-promoter who has called himself “the world’s most eligible bachelor” on Twitter, was arrested in a gray hoodie and taken into federal court in Brooklyn, where he pleaded not guilty. He was released on $5 million bail.

If convicted, he could get up to 20 years in prison. He left court without speaking to reporters. His attorneys had no immediate comment.

Online, many people took delight in his arrest, calling him a greedy, arrogant “punk” who gave capitalism a bad name and got what was coming to him.

Some cracked jokes about lawyers jacking up their hourly fees 5,000 percent to defend him in his hour of need.

Prosecutors said that between 2009 and 2014, Shkreli lost some of his hedge fund investors’ money through bad trades, then looted Retrophin, a pharmaceutical company where he was CEO, for $11 million to pay back his disgruntled clients.

Shkreli “engaged in multiple schemes to ensnare investors through a web of lies and deceit,” U.S. Attorney Robert Capers said in a statement.

According to USAToday, Shkreli told one investor on Dec. 2, 2010, that his hedge fund held $35 million assets, even though it had only had $700, the criminal indictment alleged.

Shkreli was charged with securities fraud and conspiracy. A second defendant, lawyer Evan Greebel, of Scarsdale, New York, was charged with conspiracy and also pleaded not guilty.

On Thursday, Robert Weissman, president of the watchdog group Public Citizen, said Shkreli got “a deserved comeuppance.”

“Al Capone was brought down for tax evasion, but he committed many worse crimes,” Weissman said. “So if Shkreli’s arrested for securities violations, it’s a comparable justice.”

Shkreli is known as a prolific user of Twitter and often livestreams his work day over the Internet, inviting people to chat with him at his desk. He refers to those who follow him online as his “fans.”

Recently it emerged that he bought the only copy of a Wu-Tang Clan album titled “Once Upon a Time in Shaolin,” which the hip-hop group sold on the condition that it not be released publicly. He said he paid $2 million.

Capers, the chief federal prosecutor, sidestepped a question about whether authorities had seized Shkreli’s album, and said: “We’re not aware of how he raised the funds to buy the Wu-Tang album.”

Last month, Shkreli was named chairman and CEO of KaloBios Pharmaceuticals after buying a majority stake in the struggling cancer drug developer.

After his arrest, its stock fell by more than half Thursday before trading in the company was suspended.