Ansar Burney, Pakistan's minister for human rights, said: "Singh was a former policeman from Hoshiarpur town in the Indian state of Punjab who became a trader in electronic goods. He was arrested during a business trip to the Pakistani city of Rawalpindi in 1973."
Burney said the Pakistani government stayed his execution in the late 1970s and since then his case languished.
Burney said Singh could not be released earlier as some of the paperwork was missing.
Singh had been in touch with his family through letters but that contact broke down 24 years ago after he was shifted repeatedly between prisons.
Burney added that Singh's only communication with his family over the years was a single letter that he received from them many years ago.
The Pakistani human rights minister said that he had been looking for Singh for quite some time but had been unable to locate him because Singh had been known in prison by the name of Ibrahim.
Burney said he learned of Singh's identity in December during a visit to his jail and pleaded with Musharraf to grant him clemency on humanitarian grounds.
Musharraf subsequently agreed to end his death sentence and issued orders for his release.
Pakistan and India have fought three wars in the last 60 years and frequently arrested each other's citizens, including many fishermen and others who strayed across the border inadvertently.
Many are accused of spying and held for years, usually with no contact with their families.