“Two gunmen riding a motorbike intercepted Captain Naveed’s vehicle and opened fire, killing him on the spot,” local police official Tahir Naveed told AFP.
He had only one name for the dead officer.
Naveed’s wife sustained a bullet injury in the attack and has been taken to a naval hospital, he added.
Naveed taught at the Karachi campus of the National University of Sciences
A naval intelligence official also confirmed the killing.
There was no immediate claim of responsibility for the attack.
Taliban militants raided a naval base in the city in May 2011, destroying two P-3C Orion surveillance planes and killing 10 personnel in a 17-hour assault.
Karachi, which is Pakistan’s largest city, is suffering from an unprecedented wave of killings and kidnappings blamed on Islamist militants, criminals, and ethnic and political tensions.
Gang wars fed by ethnic and political bitterness, drugs and the Taliban, have created a culture of impunity in the city of 18 million, and the past two years have seen record death tolls.
In the first six months of 2013, 1,726 people were killed compared with a previous high of 1,215 in the same period last year, according to the Human Rights Commission of Pakistan.
Prime Minister Nawaz Sharif is currently in Karachi for talks with political parties designed to come up with a strategy to improve the worsening law and order situation in the city.