Cameron James Pettit, 28, was arrested Wednesday morning by special agents with the Drug Enforcement Administration and officers with the Los Angeles Police Department, according to the U.S. Attorney's Office. Pettit appeared in a downtown Los Angeles court later in the day and was denied bail.
Pettit was arrested following a criminal complaint filed Aug. 30 that charges him with one count of distribution of a controlled substance.
According to the affidavit, Pettit and others distributed narcotics to Miller, whose real name was Malcolm James McCormick. Prosecutors say Pettit sold 30 milligram oxycodone pills, as well as cocaine and Xanax, to McCormick on Sept. 5, 2018. Instead of supplying "genuine" oxycodone, investigators say Pettit sold McCormick counterfeit oxycodone pills that contained fentanyl - a powerful synthetic opioid that is 50 times more potent than heroin.
McCormick was found unresponsive Sept. 7, 2018 at his home in the 11600 block of Valleycrest Drive. He was pronounced dead at the scene by emergency responders.
"Fentanyl is a killer, and it's never more deadly than when it's disguised to look like a genuine pharmaceutical pills," Matthew Jacobs, an Assistant U.S. Attorney for the Central District of California, said at an afternoon news conference. "If there's anything to take away from this, it's that people should know that if they consume black-market opioid pills, they're playing Russian roulette."
WATCH: Prosecutors discuss case against man charged in overdose death of Mac Miller
The affidavit states that hours after news outlets reported McCormick's death, Pettit sent a message to a friend stating, "Most likely I will die in jail."
A Woodland Hills woman, identified as Mia Pascal Johansson, was also named in the complaint. Federal authorities say Johansson is a madam who worked with Pettit in the distribution of the drugs. According to the complaint, Miller tried reaching Pettit late on the night of Sept. 4 but then texted Johansson for the drugs instead when Pettit didn't respond.
The complaint alleges Miller eventually received drugs from them both but only Pettit's oxycodone was laced with fentanyl. Search warrants were served at both of their homes but no charges had been filed with the woman.
The Los Angeles County Medical Examiner-Coroner later determined the hip-hop artist died of mixed drug toxicity involving fentanyl, cocaine and alcohol.
The Pittsburgh native was in a two-year relationship with Ariana Grande that ended earlier last year.
His music, which often examined his depression and drug use, won him fans among some of the biggest names in hip-hop.
If convicted of the drug trafficking charge, Pettit would face a statutory maximum sentence of 20 years in federal prison. He is scheduled to appear in court again in October.
An investigation is ongoing.