The attack, which police say was targeted, comes a week after another senior officer was killed in a suicide attack in the city.
"Unknown assailants sprayed bullets on the vehicle of acting Superintendent of Police Muhammad Ilyas", senior police official Abdul Razzaq Cheema told AFP.
He said the officer, his wife, son and granddaughter were killed in the attack.
The incident was confirmed by other local police officials.
Quetta is the capital of Balochistan province, which borders Iran and Afghanistan. It is Pakistan's most restive region, afflicted by Islamist militancy, sectarian violence, and the separatist insurgency.
Earlier on Wednesday, officials recovered the bullet-riddled bodies of 15 illegal migrants near the Iranian border.
Follow NDTV for latest election news and live coverage of assembly elections 2019 in Maharashtra and Haryana.
Subscribe to our YouTube channel, like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.