MODESTO, Calif. — After California changed its murder laws last fall, Neko Wilson was the first man to walk free.

Mr. Wilson, 37, had been facing the death penalty for a 2009 robbery that led to the deaths of a couple in Fresno County. No one accused him of killing anyone, or even of being in the family’s home that night, but prosecutors said that he helped plan the break-in.

At the time, that was enough for him to be charged with felony murder, under a doctrine that holds that anyone involved in a crime is responsible if a death occurs. But in September 2018, the Legislature limited murder charges to people who actually killed, intended to kill or acted as a major player with “reckless indifference to human life.”

And so in October, Mr. Wilson left the Fresno County jail, where he had spent nine years awaiting trial, subsisting largely on beans and instant noodles. He found his new freedom “overwhelming — it was unfathomable,” he said recently. “I could barely breathe when my fiancée tried to hug me.”