Two gunmen, who were riding a motorcycle, fired indiscriminately at the taxi on Spini Road on the outskirt of Quetta, police said, adding three men were killed instantly.
The injured men were taken to the nearby Bolan Medical Hospital.
The gunmen escaped after the shooting.
Police officials and witnesses said all the victims were Hazara Shias.
The incident created tension in the area. The Hazara Democratic Party strongly condemned the attack.
Quetta and its surrounding areas have witnessed a series of attacks on Hazara Shias. Dozens of members of the minority community have died in these attacks.
The banned Lashkar-e-Jhanvi have been blamed for most of the attacks.