In a courtroom artist’s representation of a June hearing, James Malcolm, in orange jail jumpsuit, sits next to Assistant Federal Defender Benjamin Galloway and Assistant U.S. Attorney Justin Lee as U.S. Magistrate Judge Edmund F. Brennan presides. Vicki Behringer

In a courtroom artist’s representation of a June hearing, James Malcolm, in orange jail jumpsuit, sits next to Assistant Federal Defender Benjamin Galloway and Assistant U.S. Attorney Justin Lee as U.S. Magistrate Judge Edmund F. Brennan presides. Vicki Behringer

James Malcolm had a problem. A big one.

The three-bedroom home he purchased for his family in Carmichael had hidden fire damage he didn’t know about, and after failing to get insurance to fix the problem he began sinking his own money into the repairs without success.

Soon, Sacramento County was warning Malcolm the repairs had to be completed or his wife and young children would be tossed from the house and become homeless.

“Mr. Malcolm was frantic,” his lawyer wrote in federal court documents filed last week. “It was in this state that Mr. Malcolm found himself watching an episode of ‘Breaking Bad,’ about a mild-mannered teacher who turns to a life of crime to save his family from financial ruin.”

Digital Access for only $0.99

The episode focused on the poison ricin, and soon Malcolm, who had no criminal history, seized on a plan to sell small, nonlethal amounts of poison over the Internet. “His idea was to make money from those who wanted the poison without actually hurting anyone,” his lawyer wrote.

Instead, Malcolm found himself the focus of a two-month undercover federal probe into illegal gun and explosives sales and distribution of poisons over encrypted darknet sites in exchange for bitcoin payments.

The probe culminated on a Sunday night in May 2014 when federal agents, concerned over possible danger to Malcolm’s Garfield Avenue neighbors, raided his home and arrested him.

Malcolm, 31, has been held without bail since then in the Sacramento County jail.

He pleaded guilty in October to possession of a biological agent, unlawful dealing in firearms and illegal possession of a machine gun. Malcolm’s guilty plea could have netted him up to 25 years in prison and fines of up to $750,000.

But his lawyer and prosecutors “agree that a sentence of 60 months is the appropriate disposition of this case” when he is sentenced in federal court Thursday in Sacramento, according to documents filed by Assistant Federal Defender Ben Galloway.

“This was Mr. Malcolm’s first brush with the law, and it was a desperate attempt to keep a roof over his family’s head,” Galloway wrote.

Now-defunct sites such as Silk Road and Black Market Reloaded lured sellers and buyers into a side of the Internet that guaranteed anonymity to users and led Malcolm into what his attorney said was a last-ditch money-making scheme.

After seeing the “Breaking Bad” episode about ricin, Malcolm began doing research online about the poison and discovered it could be produced from castor bean plants.

“He discovered that a few dollars’ worth of legal plant material could be crushed and resold to buyers on online black markets for many times the value,” his lawyer wrote in a sentencing memorandum. “Mr. Malcolm posted a notice on a darknet website testing buyers’ interest in the product.

“He received multiple inquiries.”

Malcolm admits to sending small amounts of the toxin abrin, contained in crushed rosary peas, to buyers in New York and San Francisco.

Court papers say one of those packages was mailed from a Vacaville UPS store Dec. 5, 2013, to a buyer in New York who planned to use the poison to commit suicide. That person had second thoughts about suicide and, instead, walked into a New York police precinct with a vial of white powder that later tested positive as cyanide, documents say.

The other package, consisting of small flashlights with their cavities stuffed with ground rosary beads, was mailed Dec. 6, 2013, to Ryan Kelly at a Polk Street apartment in San Francisco tied to a former political consultant named Ryan Kelly Chamberlain II.

Chamberlain disappeared from sight in May 2014 after the FBI announced a nationwide manhunt for him amid fears he was trying to build an improvised explosive device. He was arrested in San Francisco a few days later and jailed.

In a 19-minute court hearing in San Francisco federal court last month, Chamberlain pleaded guilty to unregistered possession of a biological agent and possession of a firearm with its serial number removed. He faces sentencing April 6.

Both the plea agreements hammered out for Chamberlain and Malcolm remain sealed by court order.

But a three-page document – the “factual basis for plea” that spells out Malcolm’s actions – was unsealed by court order after a request by The Sacramento Bee.

That document describes federal agents seizing material from his home, sport-utility vehicle, a storage locker and a cache hidden in the Eldorado National Forest. Among the items recovered were a beaker, grinder and mask; all three tested positive for the presence of abrin.

The document also states that in separate meetings Malcolm sold short-barrel AR-15 machine guns, firearm parts that allow weapons to be converted to fully automatic firearms, a silencer and explosives to undercover agents.

All of those deals, his lawyer argues, were to help his family.

“Importantly, Mr. Malcolm never intended to harm anyone, and no one was harmed by his actions,” Galloway wrote. “Still, he never should have gotten involved in this world and has been working since his arrest to make amends.”