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
Rain will continue to fall in the north and west of England as the south remains largely dry for the start of the day.
Records reveal The Lord of the Rings and The Hobbit might never have been written had JRR Tolkien not fallen ill with “trench fever”
Astronauts living on Nasa's Space Station no longer need to worry if they forget to pack something - they can just 3D print what they need.