Mac Miller was found unresponsive at his home in the Studio City neighbourhood and pronounced dead there, the Los Angeles County Coroner's Office says in a statement.
Mac Miller, a rapper from Pittsburgh whose debut album topped the charts in 2011 after his upbeat style gained a following online and who previously dated singer Ariana Grande, died on Friday in Los Angeles at age 26, officials said.
He was found unresponsive at his home in the Studio City neighbourhood and pronounced dead there, the Los Angeles County Coroner's Office said in a statement.
Celebrity website TMZ reported that Miller died of an apparent drug overdose. Reuters could not confirm that.
Miller, whose real name was Malcolm McCormick, had discussed his use of drugs, particularly the misuse of prescription cough syrup, in media interviews and rap lyrics.
The coroner's office did not release the cause of death, saying an autopsy was pending.
Miller's family in a statement confirmed the death and called him "a bright light in this world for his family, friends and fans."
Miller first gained a following at age 18 with his mixtape "K.I.D.S." in 2010, and early in his career was known for party-style songs with videos that went viral.
After his 2011 debut "Blue Side Park" was released by an independent label and topped the charts, Miller turned to jazz and funk influences on later albums. Those releases often received praise from critics, but did not perform as well commercially as his first album.
Praying for Mac’s family and that he rest easy 🙏🏽👼🏽 #pgh #412— Wiz Khalifa (@wizkhalifa) September 7, 2018
Rapper Wiz Khalifa, who like Miller grew up in Pittsburgh and was close to him, tweeted on Friday: "Praying for Mac's family and that he rest easy."
The rapper, whose most popular songs included "Loud," "Smile Back" and a collaboration with Grande called "The Way," released his latest album "Swimming" this summer. It hit No. 3 on the Billboard 200 list of top albums.
Miller and Grande broke up earlier this year, after dating for two years, according to media reports.
Grande, after a Twitter user appeared to blame her for the break-up, wrote on the social media platform in May that the relationship was "toxic" and she had "cared for him and tried to support his sobriety & prayed for his balance for years."
In May, Miller was arrested in Los Angeles in connection with a car crash and was later charged with driving under the influence.
Miller was scheduled to launch a US tour next month, and had tweeted about it on Thursday. "I wish it started tomorrow," he wrote.