In an open letter to President Barack Obama, R&B singer John Legend urged the president to curb criminal injustice by pardoning thousands of nonviolent drug offenders.

The message, published Friday by Rolling Stone, expresses gratitude and admiration for the progress that Obama has made during his two terms but asked that he do more before his tenure is up in January.

"First of all, I would like to thank you for your friendship and for your outstanding service to our country," the Grammy-winner wrote. "I'm particularly grateful for the concrete steps your administration has taken to provide opportunities to tens of millions of young people and families who have been impacted by mass incarceration."

The 37-year-old University of Pennsylvania grad noted Obama's work to end juvenile solitary confinement and reduce the use of federal private prisons, but he challenged him to go a step further.

"Before you leave office, I would like to add my voice to the more than 2 million Americans who have asked you to use your clemency and pardon powers to bring justice to the thousands of families of non-violent drug offenders who have waited far too long for Congress to act," Legend wrote. "I urge you to consider issuing categorical commutations to bring an end to the injustice that remains in our federal sentencing schemes."

During his presidency, Obama has granted clemency to nearly 1,100 federal inmates -- "more ... than any chief executive in nearly 50 years," according to the Pew Research Center.

Legend challenged Obama to grant the release of thousands more nonviolent federal drug offenders who he said "are serving sentences based on prejudiced laws ...  involving crack cocaine."

"Your actions to commute the sentences of 944 individuals, including 324 life sentences, is unprecedented in the modern era," Legend wrote. "Nonetheless, more action is needed to dismantle the unjust policies of the past 40 years. An estimated 36,000 non-violent drug offenders housed in federal prisons have sought relief under your clemency initiative, and it is unclear how many of the remaining cases will be reviewed before you leave. As the surgeon general noted, drug addiction is not a moral failing but a chronic health issue deserving of our compassion. What is a moral failing, however, is the war on drugs and America's addiction to incarceration, which has not increased safety but needlessly torn families apart."

Legend was personally affected by drug-related incarceration as a teenager, when his mother was jailed for crimes fueled by drug addiction.

Read John Legend's full letter to Obama on Rolling Stone.