Exclusive

Juice WRLD died from an accidental overdose ... according to the Cook County Medical Examiner.

The M.E.'s Office says it found Oxycodone and codeine in his system and determined he died from toxic levels of those drugs.

TMZ broke the story ... Juice WRLD died in early December following a drug bust at Midway Airport in Chicago. Witnesses believed the rapper had swallowed a bunch of Percocet pills in an attempt to hide them from the feds. He ultimately suffered seizures, which proved fatal.

We should note Oxycodone is the main active ingredient in Percocet. Juice often rapped and talked about abusing lean -- aka codeine cough syrup. So, the presence of codeine in his system adds up.

As we reported, after Juice WRLD's death his mother, Carmella Wallace, told us her son had "battled with prescription drug dependency." She told us her hope was that Juice's openness about his struggles would help others dealing with the same issues.