Jailed more than two decades for a crime he did not commit, William Lopez’s brief taste of freedom came to a sudden, tragic end Saturday when the man died just days before his $124 million lawsuit for false imprisonment was set to start.

The 55-year-old Bronx man had finally been freed in January 2013, after 23 years behind bars for murder, but a massive asthma attack ended Lopez’s short post-prison life at about 1 a.m. Saturday, his lawyer told The Post.

Supporters said his unexpected demise denied him the justice he deserved.

“He was always looking forward to being compensated,” said his friend and criminal lawyer Jeffrey Deskovic. “His life was really robbed from him.”

Lopez had hoped whatever money he got from the suit would help him enjoy a few of the comforts he was denied in prison.

“He wanted to do some domestic travel to other states, and to travel internationally,” Deskovic said. “He wanted to go to college and to go to law school. He wanted to set his wife up in business, and he wanted to be an entrepreneur.”

“It feels great to be back on Earth,’’ Lopez said after his release. “I’m looking forward to restoring my life as best as I can.’’