Awais Ali Shah, a lawyer himself, was abducted last month from Karachi. He was found in Tank, which lies close to the tribal region bordering Afghanistan where the military has been battling Taliban.
Three militants were killed during the operation.
"Awais Shah, son of Sindh High Court Chief Justice Sajjad Ali Shah, recovered through an IBO from custody of terrorists from near Tank, three terrorists killed," Director-General of the Inter-Services Public Relations Lieutenant General Asim Bajwa tweeted.
"A Tehreek-e-Taliban Pakistan (TTP) splinter group was behind Awais Ali Shah's kidnapping. The group were in touch with us and did communicate with us but cannot say anything further due to security reasons," Bajwa said.
Masked men kidnapped Shah from outside a supermarket in Karachi on June 20. It was feared that he could be used as a bargaining chip in negotiations to free imprisoned militants.
Shahbaz Taseer, the son of former slain Punjab governor, Salman Taseer was recovered in March from the Balochistan province after spending five years in captivity. He was kidnapped by militants and kept in Afghanistan.
In May, Ali Haider the son of former Prime Minister, Yousuf Raza Gilani who was kidnapped from Multan was recovered from Afghanistan after three years in captivity of militant outfits.
Prime Minister Nawaz Sharif also congratulated justice Shah on the recovery of his son and praised security forces.
Kidnapping by criminal gangs and militants is common in the country. Police did not say why they suspected Shah had been abducted by militants.
Karachi has long been plagued by political, ethnic and religious violence, although crime has dropped sharply since the launch of a paramilitary operation in September 2013.
