After the 1999 Pakistani coup d'état by General Pervez Musharraf, the inquiries led by the National Accountability Bureau (NAB) indicted Ahmed on large-scale corruption and misappropriation of funds while serving as the Director of IB, eventually finding him guilty in 2001. He was sentenced to eight years imprisonment for corruption, and was released in 2008–09.