Zhang Yuhuan maintained he was tortured by police and forced to confess to the murder of two young boys in 1993.
He was China's longest-serving wrongfully convicted inmate, after having served 9,778 days in the prison in Jiangxi province.
Prosecutors who reopened the case said his confession had inconsistencies and did not match the original crime.
He walked free after a high court found there was not enough evidence to justify his conviction.
Observers say China is growing more willing to quash wrongful convictions, but only criminal not political.
Footage on Chinese media showed Mr Zhang in an emotional reunion with his 83-year-old mother and his ex-wife following his release on Tuesday.
It is an open secret in China that the police use various kinds of torture, including sleep deprivation, cigarette burns and beatings, to force suspects to confess to crimes. In the past, entire cases might then be pinned on that "confession".
In 2010, a serious effort began in China's legal system to stamp out the use of forced confessions. Death sentences must now be approved by China's Supreme Court and there is a growing drive to eliminate cases that are pinned solely on a suspect's confession.
However, China's legal reform has clear limits. Police in many provinces remain under heavy pressure to "solve" cases, often by producing suspects and there is little appetite to improve the treatment of dissidents and some ethnic minorities, including Muslim Uighurs.
The authorities regularly detain individuals in politically sensitive cases and interrogate them outside of the normal detention system. Behind those closed doors, almost anything can happen. It is far more likely that China will reform its treatment of criminal suspects than those who appear to threaten the dominance of the Communist Party.
His former wife, Song Xiaonyu, had two sons with Mr Zhang before they divorced 11 years ago. She remarried but continued to help her former husband with his appeal.
"I was so excited when I heard the court's announcement," said Ms Song.
Mr Zhang was told by the court that he was entitled to compensation for wrongful conviction.
"I'll negotiate the exact amount of compensation with my client," Mr Zhang's lawyer, Wang Fei, told China Daily. "We're also planning to ask for those who committed judicial miscarriages in the case to be held accountable."
Mr Zhang's ordeal began in October 1993 when the bodies of two boys were discovered in a village reservoir in Jinxian, a county of Nanchang, capital of Jiangxi.
Mr Zhang was a neighbour of the victims and was identified as a suspect and detained.
In January 1995, a court in Nanchang found him guilty and sentenced him to death but allowed the sentence to be commuted to life imprisonment after he served two years.
Mr Zhang said he was tortured by police during interrogations and continued to maintain his innocence.
Despite this, his appeals were unsuccessful. Then, in March 2019 the high court agreed to retry the case and in July provincial prosecutors recommended Mr Zhang be acquitted based on insufficient evidence.
In a statement, high court judge Tian Ganlin said: "After we reviewed the materials we have found there is no direct evidence that can prove Zhang's conviction. So we accepted the prosecutors' suggestion and have declared Zhang innocent."
The killer of the two boys in 1993 remains unknown.
Believe those who are seeking the truth. Doubt those who find it.