On Thursday, for the first time in American history, a president walked into a federal prison. President Obama was there to see for himself a small piece of the damage that the nation’s decades-long binge of mass incarceration has wrought.

Mr. Obama’s visit to El Reno, a medium-security prison in Oklahoma, capped off a week in which he spoke powerfully about the failings of a criminal justice system that has damaged an entire generation of Americans, locking up millions — disproportionately men of color — at a crippling cost to them, their families and communities, as well as to the taxpayers and society as a whole.

Speaking to reporters after touring the cells, Mr. Obama reflected on the people he met there. “These are young people who made mistakes that aren’t that different than the mistakes that I made, and the mistakes that a lot of you guys made. The difference is they did not have the kinds of support structures, the second chances, the resources that would allow them to survive those mistakes.”

This indisputable argument has been made by many others, most notably former Attorney General Eric Holder Jr., who was the administration’s most powerful advocate for sweeping justice reforms. But it is more significant coming from the president, not just in his words but in his actions. On Monday Mr. Obama commuted the sentences of 46 people, most serving 20 years or more, for nonviolent drug crimes. It was a tiny fraction of the more than 30,000 people seeking clemency, but the gesture recognized some of the injustices of America’s harsh justice system.