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
Newly-released documents reveal how British spymasters used an enticing female agent to test the mettle of rookie spies.
Researchers studying the King's remains believe he died after sustaining numerous blows to the head.
Edinburgh and its institutions have been at heart of the Union since it came about in 1707, here we look at the city's history.