In barely 24 hours, Martin Shkreli went from an egotistical pharmaceutical boy wonder running two small drug developers and live-streaming his daily activities to unemployed and facing securities fraud charges that could land him in prison for years.

KaloBios Pharmaceuticals, one of Shkreli's companies, said Monday in a statement that it had terminated Shkreli as its CEO last Thursday and that he resigned from its board of directors then. That was the same day that Shkreli, a 32-year-old former hedge fund manager, was arrested in New York and charged with securities fraud and conspiracy related to a company he previously ran.

Shkreli was led from his apartment in handcuffs by authorities Thursday morning and later pleaded not guilty and was released on $5 million bail. The charges carry a sentence of up to 20 years in prison if he's convicted. By the time Shkreli made bail, Turing Pharmaceuticals Inc., which he had founded and ran, announced he had resigned as the CEO.

It was a surprising reversal, even for an executive dubbed the "most hated man in America" this fall after he jacked up the price of Daraprim from $13.50 to $750 per pill. Daraprim is the only approved drug for a life-threatening parasitic infection that mainly strikes pregnant women, cancer patients and AIDS patients.

Amid mounting criticism from patients, doctors and politicians, Shkreli pledged to lower Daraprim's price, but later reneged and instead offered hospitals a 50 percent discount — still amounting to a 2,500 percent increase. Patients normally take most of the weekslong treatment at home, so they still face the 5,000 percent price increase, though Turing is offering financial aid to those who can't afford the drug.

KaloBios Pharmaceuticals Inc. is a faltering drug company whose shares skyrocketed after Nov. 19, when Martin Shkreli disclosed a huge stake and became its CEO and board chairman. At the same time, a few people resigned from the company's board of directors and were replaced by three new people. One of them, Tony Chase, resigned from that position last Thursday when Shkreli was ousted.

The South San Francisco, California, company has been attempting to develop drugs to treat cancer and leukemia. Its shares tumbled 70 percent in January after its drug for lung infections failed in testing, and the company announced it would shut down right before Shkreli and a group of investors swooped in with cash and pledges of financing to keep it going.

Federal prosecutors allege that from 2009 to 2014, Shkreli made bad trades that lost money of some investors in his hedge fund, MSMB Capital Management, then looted a pharmaceutical company called Retrophin, where he was then CEO, for $11 million to pay back his disgruntled clients.

On Saturday, Shkreli tweeted: "I am confident I will prevail."