Overturning a sodomy charge on Thursday, the court accepted that his conviction was unsound.
The former deputy prime minister used his first few minutes of freedom to urge the country's recently installed prime minister to embrace reform in an impromptu news conference.
"Thank God it's over," he said, addressing reporters. "I have to give credit to the new prime minister for not interfering with the judiciary ... I appeal to Prime Minister Abdullah Badawi to make the necessary reforms."
Before his jailing, Anwar was a lightning rod for disaffected Malays, the country's majority ethnic grouping which dominates politics, and turned against the then prime minister, Mahathir Muhammad, who was instrumental in both his rise and fall.
Reacting to the release, a member of the National Human Rights Society, Ramdas Tikamdas, criticised the length of time the court took to overturn Anwar's conviction.
"When it was plain as day to everyone else, the acquittal - after an arduous and painful legal process - does vindicate the rule of law but it cannot compensate the injustice to Anwar who was denied bail and had served prison time needlessly".
Garry Rodan, the director of the Australian-based Asia Research Centre, said he was surprised by the courts decision – though it was not clear whether Anwar would be allowed to continue his political career.
"We need to know … if he would be allowed back in to resume his role as a political actor before we are able to fully evaluate the significance of this decision."