A windowpane of the car was shattered but the pair were not hurt.
"It appears to be a targeted attack, but we are investigating further,'' police said.
Last Thursday, armed men on a motorbike fired on an army jeep in another part of Islamabad. A brigadier and a soldier died in that attack.
It was believed to be the first assassination of an army officer in the capital, signaling a potential new tactic by fighters.
Suspected Taliban fighters in Pakistan have staged several assaults in recent weeks against security forces, apparently to retaliate for the army's offensive in their stronghold of South Waziristan, a tribal region along the Afghan border.
The army moved into the region more than a week ago vowing to crush the Pakistani Taliban, which it says is behind 80 per cent of bombings in Pakistan.
An army statement on Monday said soldiers were progressing on three fronts in South Waziristan, but were meeting resistance on all of them.
It said that over the previous 24 hours, 19 fighters and six soldiers were killed.
Independent verification of army claims is very difficult because the military has blocked access to the region.