After spending nearly 25 years in prison for a murder he did not commit, a Brooklyn man toasted his new life as a free man on Wednesday.

“I got freedom, freedom!” Derrick Deacon exclaimed as he celebrated with friends and family at Tribeca’s Mudville Saloon, where he tasted his first drink outside prison walls in a quarter-century.

“God gave me a second chance. And when you got it, you got to make use of that.”

Deacon, 58, who gave up smoking and alcohol behind bars, sipped orange juice as he finally dined on something other than prison grub, chowing down on chicken wings and chili.

Deacon recalled how his “knees buckled” when he heard the not-guilty verdict Monday at the new trial he was granted after another man was identified as the real killer.

“I took a deep breath and I was screaming, ‘Oh, God, I’m free!’ ” Deacon said about his long-awaited vindication.

“I was trembling. I was in tears. I couldn’t believe it. I told my lawyer she got to hold me.”

Deacon said the world of cellphones is vastly different from the one he left 24 years ago.

“When I was in the streets, I remember using a phone in the case — you had to pull on the top, big phones,” he said.

“When I see [my lawyer] texting, I was like, ‘What is this?’ I was like, ‘Wow, it’s a different world man.’”

Deacon was imprisoned in 1989 and convicted of gunning down 16-year-old Anthony Wynn during a robbery in a Flatbush apartment building.

He was given a new trial in 2012 after a Jamaican gangbanger was fingered for the crime.

Deacon relaxed at the Manhattan bar with a young man, Jason Bernard, whom he regards as his son, and fantasized about opening a barber shop or writing a book.

“I just want to own my own business,” he said.

The lawyers who worked almost seven years to set him free, joined him for the celebration.

“Derek kept the faith for 25 years,” said defense attorney Glenn Garber, founder of the Exoneration Initiative, a free legal-assistance program. “I think he was fueled by his innocence.”

The joyous scene Wednesday was a far cry from the anguish Deacon felt when he was wrongfully convicted in 1989.

“I went crazy when they said guilty. I couldn’t stand up,” Deacon recalled. “It was a nightmare. Convicted for something I didn’t do. I couldn’t sleep some nights.”

Another reason Deacon got a retrial was the recantation of witness Colleen Campbell, who testified she had seen the murderer fleeing the crime scene

Campbell now claims she knew it wasn’t Deacon, but she’d feared identifying a member of the Jamaican gang.