Abdul Razzaq Cheema, a senior police official, said the attack was carried out on the main Saryab Road in the southwestern city of Quetta, the capital of Balochistan province.
The assailants managed to flee on the motorcycle.
Farid Sumalani, the head of the Sandeman Provincial Hospital, confirmed the fatal incident.
A local affiliate of the Takfiri Daesh terrorist group has claimed responsibility for the deadly attack. Ali Bin Sufyan, a spokesman for the Al Alami branch of the notorious terrorist group known as Lashkar-e-Jhangvi (LeJ), said its fighters carried out the shooting.
In recent months, Daesh, which is wreaking havoc mainly in Iraq and Syria, has been making inroads in Pakistan through alliances with local militant outfits such as LeJ and the Jamaat-ul-Ahrar, a breakaway faction of the Pakistani Taliban.
LeJ has claimed joint responsibility along with Daesh for several major attacks in the region including one on lawyers in Quetta that killed more than 70 people in August last year.
Earlier this week, Daesh said it had killed two Chinese citizens who were kidnapped last month by armed men in Quetta.
Quetta, the largest city of Balochistan, has seen several bombings and shooting attacks over the past years. A large number of Shia Muslims have been killed in the attacks there.
Two militant attacks against the Shia Hazara community in Quetta killed more than 200 people in early 2013.
Despite frequent offensives by the Pakistani army, acts of terror by militant groups including some Baloch outfits continue to target security forces as well as civilians.
Some Baloch militant groups say they want greater political autonomy and a share of the province's natural resources.
Thousands of Pakistanis have lost their lives in bombings and other militant attacks since 2001, when Pakistan entered an alliance with the United States in the so-called war on terror. Thousands more have been displaced by the wave of violence and militancy sweeping across the country.