Stephen Walter was sentenced to 210 months in federal prison, according to the U.S. Attorney's Office.
Walter, 49, pleaded guilty last year to a federal count of distribution of fentanyl.
In September 2018, Miller died of a drug overdose -- namely, a fatal mixture of fentanyl, cocaine and alcohol. Just a few days before the 26-year- old rapper's death, Walter supplied the fentanyl that ultimately killed him.
Two others were also charged. Ryan Reavis, 39, pleaded guilty to the distribution charge and was sentenced in April to almost 11 years behind bars. The case against Cameron Pettit, 30, of West Hollywood, is pending.
The pills traveled from Walter to Reavis, who supplied the counterfeit oxycodone pills to the third defendant, according to papers filed in Los Angeles federal court.
Reavis admitted knowing that the pills contained fentanyl or some other controlled substance. Shortly after Reavis handed over the pills, Pettit allegedly supplied them to Malcolm McCormick -- who recorded and performed under the name Mac Miller -- two days before the rapper suffered a fatal overdose in Studio City on Sept. 7, 2018, federal prosecutors said.
Miller began rapping at 14 and built a large following before signing with the label of fellow Pittsburgh rapper Wiz Khalifa. Miller released five studio albums and a series of mix tapes during his career. His final album, "Swimming," was released on Warner Records just a month before his death.