“Personally, I think Martin Shkreli has become wealthy at the expense of the public good. I don’t believe for a second that his manipulation of drug prices fuels valuable research as he has claimed,” said Katie Uva, a 2006 alumna of Hunter College High School in Manhattan where Mr. Shkreli attended, in an email response to questions. This fall, Ms. Uva started an online fund-raising campaign to match a $1 million donation from Mr. Shkreli to Hunter in the hope of persuading the school to return the donation. So far, the campaign has raised about $800 from 16 donors.

Mr. Shkreli (pronounced SHKRELL-ee) could have been a quintessential archetype for the immigrant’s dream of American success. He grew up in a crowded apartment on Ocean Avenue in Brooklyn, the son of Albanian immigrants who worked janitorial and other side jobs to support him and his three siblings.

Mr. Shkreli was admitted into Hunter, an elite Manhattan public school for the intellectually gifted. On Thursday, two former classmates remembered Mr. Shkreli as a somewhat shy person who could often be found lingering in the school’s hallways, playing chess, his guitar or looking at stocks in the newspaper.

But he stopped attending classes and was asked to leave before his senior year. He received the credits needed for his high school diploma through a program that introduced him to Wall Street, placing him at an internship at the Wall Street hedge fund Cramer, Berkowitz & Company.

Eventually, Mr. Shkreli opened his own hedge fund — Elea Capital. It didn’t last long, collapsing in 2007 on a big bet he made that went against him. Undeterred, in 2009, he started his second hedge fund, MSMB Capital, the initials of Mr. Shkreli and his partner, Marek Biestek, whom he met while attending Baruch College.

Like Elea, MSMB’s performance wasn’t nearly as hot as Mr. Shkreli let on. From 2009 through 2012, Mr. Shkreli lost millions of dollars trading in the market, according to the accusations contained in the indictment. But he hid those losses, telling investors instead that the funds had strong double-digit returns.