Officials said General Miller escaped unhurt after a burst of gunfire in the governor's compound in the southern province of Kandahar on Thursday, but Kandahar police chief Gen. Abdul Razeq was killed.
Meanwhile, Kandahar Governor Zalmai Wesa was seriously injured. Officials said one of Wesa's bodyguards opened fire as he came out of the meeting in his office with Miller, Razeq and other officials.
The Taliban claimed responsibility for the attack, saying both Miller and Razeq, who had a fearsome reputation as an enemy of the militant group, were targeted, Presstv Reported.
Miller took command of US forces and NATO troops in Afghanistan last month. NATO spokesman Colonel Knut Peters confirmed that two Americans were wounded in the crossfire.
The attack came ahead of parliamentary elections on Saturday, raising fresh security fears amid Taliban's warning to target the event.
Militants have killed six other candidates, both before and after the 20-day campaign period started. Two candidates have been abducted and three others wounded in the ongoing violence.
Razeq's death risks destabilizing southern Afghanistan at a time of huge political uncertainty and a worrying deterioration in security situation.
The police chief was seen as one of Afghanistan's most effective leaders, largely responsible for keeping Kandahar province under control.
He had survived several attempts on his life over many years and narrowly escaped an attack last year in which five diplomats from the United Arab Emirates were killed in Kandahar.
On Wednesday, a bomber killed two Afghan civilians and wounded at least three foreign troops in an attack near the largest US military base near the capital, Kabul.
Mohammad Mahfouz Walizada, police chief of Parwan province where the military base is located, said a bomber on foot targeted foreign forces while they were on patrol.
Afghan people still face insecurity 17 years after the United States and its allies invaded the country as part of Washington’s so-called war on terror.
Although the Taliban were removed from power as a result of the invasion, many areas are still threatened by insecurity.
Bomb attack injures 5 Czech solders in Afghanistan
In another development on Thursday, five Czech soldiers were injured in a bomb attack on a military convoy in Afghanistan’s Parwan province, only two months after three others were killed, a Czech Defense Ministry statement was quoted by AFP as saying.
"The attack on the Czech patrol occurred on Wednesday around 1220 GMT near the Bagram base in the Parwan province," the statement added.
According to Czech army chief of staff, Ales Opata, the soldiers were injured when an Afghan civilian car loaded with explosives was blown up as the convoy led by an American vehicle was passing by, sweeping the Czech vehicle with six soldiers off the road.
Based on later reports, one soldier with serious injuries underwent two surgeries as another with light injuries remained in hospital. Another three were treated as outpatient and the last soldier got away unscathed.