The men disappeared in January and at least four of them subsequently returned home.
It was not know who had picked them, but fingers were pointed at the security agencies.
However, the government and military authorities denied any wrongdoing.
The Islamabad High Court (IHC) started blasphemy proceeding against them following a virulent campaign on the social media targeting the military.
Their lives were in danger as blasphemy is a highly sensitive topic in Pakistan.
More From This Section
However, after months-long investigation, the Federal Investigation Agency (FIA) informed the court today that there was no evidence of blasphemy against them, an FIA official said.
The judge warned of action against those who wrongly accused the five men of blasphemy.
The IHC on March 31 had tasked FIA to investigate the allegations.
Earlier, he said that accusing an innocent person of blasphemy was also a crime.
"Falsely accusing someone of blasphemy is an offence as serious as blasphemy itself," Siddiqui said.
Blasphemy carries death sentence in Pakistan and often the accused are in danger of attacks from extremists.