The detainee has been identified as Allah Noor, who is a resident of Pakistan's Quetta province.
He was planning to attack the Pol-e-Charkhi prison, the NDS statement read.
The intelligence agency said that Noor has confessed to his crimes and said that he wanted to be a part of the attack.
The detainee has also confessed that he joined the ISI ranks in 2014 and has since helped establish links between ISI agents and Taliban leader Mullah Hebatullah as well as Haqqani network leader Sirajuddin Haqqani.
Image: Source (WP:NFCC#4)/Wikipedia