A Williamsburg man ran a $1.5 million heroin ring out of his apartment — with the help of 25 others including family members, a Manhattan court employee and a wannabe drug counselor, prosecutors alleged Thursday.

Ringleader Jose Tavera’s apartment at 778 Driggs Ave. was the epicenter for the family-run cartel that involved his mom, sister, brother and cousins, who supplied and distributed drugs and laundered the proceeds, ​said Brooklyn DA Ken Thompson.

Tavera’s sister Sheila Taveras, 26, allegedly bagged and transported the heroin, while his mother, Haydee Cordero, 46, deposited cash from the sales into her Chase bank account, prosecutors said.

Tavera’s brother, Jose Taveras, 26, and two cousins, Gustavo Taveras, 27, and Christian Rodriguez, 24, were suppliers, prosecutors added.

The ring, which spanned parts of Brooklyn, Staten Island and Queens, peddled 25,000 glassines per month and sold bags at $10, the DA said at a press conference.

The heroin was sold under brand names like “knockout,” “power hour,” “Gucci” and “Scorpion” and hidden during transport inside boxes of Apple Jacks cereal.

“It may look innocent, but what was contained inside the Apple Jack boxes was deadly,” said Thompson.

The drugs were sold in bulk by Tavera, 24, to Jason Collazo, a Midtown Manhattan Community Court community service supervisor from Staten Island, who used court phones to coordinate his deals.

Collazo, 36, then distributed to Michael Mineo, who had a pending application to become a drug counselor for the state, to deal on Staten Island.

In one wiretapped phone conversation, Mineo and Collazo exchanged laughs over the adverse reactions their batch of heroin caused some clients.

“His face blew up, his lips blew up, hives head to toe. I couldn’t stop laughing at him, bro,” Mineo giggled to Collazo.

Mineo, 37, then says another client complained that the reactions made it feel like he “got bit by a scorpion.”

The more than two dozen people ensnared were charged in a 368-count indictment and each face up to 25 years if convicted of conspiracy, the top charge.

They were also hit with a slew of charges including criminal sale of controlled substance, criminal possession of a controlled substance and money laundering.

Tavera pleaded not guilty Thursday in Brooklyn Supreme Court and was remanded pending a bail hearing Tuesday.

Thompson said his office hasn’t yet determined the origin of the heroin or whether it was responsible for any drug-related deaths.

Prosecutors launched the investigation, dubbed “Operation South Side,” after receiving a tip from a confidential informant in 2014, the DA said.

They believe the ring has been running since at least early 2014.