WENN

Rapper Mac Miller died of an accidental drug overdose.

The Goosebumpz hitmaker passed away in September and on Monday officials from the Los Angeles County Coroner's office confirmed he died from "mixed drug toxicity" with cocaine, ethanol and fentanyl found in his system.

According to TMZ, Miller, real name Malcolm McCormick, was found unresponsive by his assistant, with alcohol and prescription pills near his body.

The amount of drugs in his system were reportedly not at lethal levels, but the combination of them proved deadly.

McCormick struggled with substance abuse issues before his death and was arrested for driving under the influence after a car accident in May. Prosecutors at the Los Angeles City Attorney's Office subsequently decided to formally drop the DUI charge against Miller after his death.

Back in July, the MC admitted the arrest had been a wake-up call, inspiring him to work towards regaining his sobriety.

"I made a stupid mistake," he told Apple Music's Beats 1 radio show. "I'm a human being. But it was the best thing that could have happened."

Miller also had previously confessed to becoming hooked on "lean" – a mixture of prescription cough medicine and soda early on in his career after reading bad reviews of his 2011 debut album Blue Slide Park.

"A lot of the reviews were more on me as a person," he told Complex in 2013. "To be honest, that was even worse. You're 19, you're so excited to put out your first album, you put it out – and no one has any respect for you or for what you did…

"I was not happy and I was on lean very heavy," Miller added. "I was so f**ked up all the time it was bad. My friends couldn't even look at me the same. I was lost."