Chaudhry Zulfikar was shot at least 13 times as he drove to court in the capital Islamabad.
He then lost control of his car, which hit a woman passer-by and killed her, police said.
Mr Zulfikar was also prosecuting militants linked to the 2008 terror attack in the Indian city of Mumbai.
Although the motive for the killing was unclear, the prosecutor's involvement in the two high-profile cases is likely to be scrutinised closely.
More top news
A bid to make it illegal for firms to require women to wear high heels at work will be debated by MPs, the Government has said.
Alexander Isak is the biggest thing to come out of Swedish football since Zlatan Ibrahimovic, but he doesn't mind, says Dickson Etuhu.
People who eat diets high in sugar could be at an increased risk of developing Alzheimer's disease, a new study has found.