President Obama in Chicago on Jan. 10. (Nicholas Kamm/Agence France-Presse via Getty Images)

IN THE final days of his presidency, Barack Obama has an opportunity to give some deserving people a second chance. He has the power to grant executive clemency — pardons and sentence commutations — to those who have been subject to inequities in the justice system, such as unduly long sentences that they would not have received under current guidelines. The president, who has been accelerating his use of this authority in recent months, should give it his best effort before crossing the finish line.

When properly carried out, the process of pardons and commutations can often be mundane. But Mr. Obama devoted far too little attention to it in his first term and granted mercy to only a handful of people. Then in 2014, halfway through his second term, the administration announced a clemency initiative to prioritize applications from inmates serving federal sentences who would have likely received a substantially lower sentence today and who were nonviolent, low-level offenders who had served at least 10 years, among other criteria.

Many drug offenders were given long sentences under older laws, in some cases decades long. When the sentencing law was revised in 2010, these offenders from earlier years remained incarcerated . Among them are prisoners convicted of sale and possession of crack cocaine who were treated more harshly than those with powder cocaine, a distinction without a difference. As Mr. Obama noted in a recent essay in the Harvard Law Review, the push in recent decades for stricter laws and tougher sentences hit the African American and Hispanic communities disproportionately hard.

Mr. Obama seems determined in the final year to do the right thing. He has now commuted sentences for 1,176 people, including 231 on a single day in December, and more are expected this week. He has also granted 148 pardons so far and thankfully avoided any embarrassing forgiveness for high-profile donors or cronies. He has denied 14,485 commutation requests and 1,629 pardon requests; 4,242 commutation requests and 505 pardon requests were closed without presidential action. Mr. Obama’s record of commutations is greater than that of any president of the post-World War II era, excepting President Gerald Ford’s 1974 clemency program for thousands of Vietnam War-era draft dodgers and military deserters.

The Obama initiative of 2014 has been followed by a surge of applications; as of Dec. 31, still pending were some 13,568 for commutation and 2,154 for pardon. Had Mr. Obama moved earlier to establish a regular process for executive clemency, many of these might have been dealt with in a more timely fashion. Justice Department officials say they have worked hard to review thousands of petitions and have sent recommendations to the president. The outlook for clemency in a Trump presidency is not very promising, given the president-elect’s law-and-order campaign rhetoric.

Mr. Obama would be wise in his final act to forgive more of those with the unreasonably long sentences that would not be imposed today. Also, he should give Mr. Trump a tip from experience: Set up a process for clemency decisions early on, and stick with it.