Muhammad Ishaq, caretaker of a shrine in eastern province of Punjab, was arrested and sentenced to death in 2013 after a complainant accused that he claimed himself to be a God.
A court in Rawalpindi last week absolved him of charges and ordered he be set free, Ishaq's lawyer Mehmood Akhtar said.
"It was proved in the court that the charges were false. We are completing paperwork to get him out of jail," Akhtar said.
The draconian blasphemy laws were introduced in Pakistan by former military ruler Ziaul Haq in the 80s and anyone charged under the laws become an easy target for extremists.
Former Punjab governor Salman Taseer was killed by a police guard in 2011 when he termed the laws "black laws" and demanded reforms.