General Abdul Raziq, 39, who has been credited with saving the Taliban's former capital from sliding back into the hands of the resurgent Islamist group, was shot in the back as he left a security meeting with American and Afghan officials.
North Atlantic Treaty Organisation is calling it an "Afghan-on-Afghan" incident; the Associated Press says the officials were "killed by their own guards" in the attack.
Meanwhile, on Wednesday a North Atlantic Treaty Organisation convoy was attacked near the Afghan capital Kabul, killing two civilians and injuring five Czech troops.
Kandahar governor Zalmay Wesa and Kandahar spy chief Abdul Momin also died. "2 Americans wounded. Gen. Miller uninjured, attacker reportedly dead", Operation Resolute Support, the NATO-led mission in Afghanistan, said in a tweet.
Jabar Qahraman had been meeting with supporters in his campaign office in the southern province of Helmand - a Taliban stronghold - when the attack happened, provincial governor spokesman Omar Zhwak told AFP.
Sources told TOLO News that Raziq was killed when assailants struck the US and Afghan group after a high-profile meeting at the governor's office. His father and uncle were killed by the Taliban in 1994; he became the provincial police chief in 2011, after his predecessor was murdered in a suicide bombing.
He had been a key figure in the United States strategy of securing the southern region against the Taliban.
Mattis commented on the attack in Kandahar during a break in meetings at an Asian security conference in Singapore.
Mr. Mattis said he had yet spoken to Gen. Miller and could not confirm the Taliban's claim of responsibility.
The Taliban has been perpetrating several attacks in the run up to the parliamentary elections. A veteran of some of the U.S. military's most secretive combat units, he formerly served as commander of the U.S. Joint Special Operations Command and participated in numerous combat operations, including in Mogadishu, Somalia, in 1993 and the wars in Afghanistan and Iraq since 2001. Three Americans were wounded.
An Interior Ministry official speaking on condition of anonymity because he was not authorized to speak to the media said Raziq rarely visited the governor's residence and was meticulous about his own security. The Taliban also attacked checkpoints in the northern Baghlan province, killing six policemen and wounding two others in a four-hour battle.
Afghan officials had warned that attacks ahead of the parliamentary election were likely.
Eight US soldiers and three other North Atlantic Treaty Organisation service members have died in Afghanistan so far this year.