Derrick Walker was 13 years into a mandatory life sentence for crack cocaine possession when his case manager summoned him a few months ago to deliver the news: Soon, he would be going home.

“I ain’t gonna lie, I gave up,” Mr. Walker said in a phone interview from a federal prison in Williamsburg, S.C. “So for me, it was a dream come true at that point.”

Mr....