Mac Miller died of an accidental overdose of fentanyl, cocaine and alcohol, the Los Angeles County Coroner's office announced on Monday.
Miller's body was released to his family after the autopsy was completed in three days, Los Angeles County coroner's spokeswoman Sarah Ardalani confirmed.
Miller, real name Malcolm James McCormick, released his fifth studio album titled Swimming in August and had a tour planned for the end of October.
The music star was recently honored in Los Angeles at a special event attended by John Mayer, Chance the Rapper, Travis Scott and other musicians.
Proceeds were given to Mac Miller Circles Fund, a charity which supports youth arts and community-building programs.