The killing will present a huge loss for President Hamid Karzai in Kandahar, as Nato troops start withdrawing combat troops and search for a political solution after a decade of war.
Although the Taliban immediately claimed responsibility, Afghan intelligence officials said the Kandahar provincial council chief was killed by a guest.
A senior official with Afghanistan's spy agency told AFP that the killer was an old friend visiting him at home. He said the gunman was not searched on arrival because of his close friendship with Karzai.
Naming the assassin as "Sardar Mohammad", he said he was a village elder in Karzai's home village and was shot dead by bodyguards after the assassination.
"He was visiting Wali in his home. They were meeting alone in a room, and he gets his pistol and shoots him dead and other bodyguards rush to the room and kill Sardar," said the official speaking on condition of anonymity.
Describing Mohammad as in "his late 30s or early 40s", he added: "Wali knew him from a long time ago."
"We can confirm he has been martyred," Kandahar provincial government spokesman Zalmay Ayubi told AFP, providing no further details.
Interior ministry spokesman Seddiq Seddiqi said: "One of the very important figures in Afghanistan has been martyred. We condemn this attack. We will provide further information later."
"He was shot dead at his house by one of the visiting guests not by a body guard, at around 11:30 am (0700 GMT)," said an official at Afghanistan's intelligence agency, the National Directorate of Security.
The official said the gunman had himself been killed by other bodyguards.
The family friend said a number of Wali Karzai's guests were also killed in the gunfire, but there was no immediate confirmation on who or how many.
Wali Karzai was for years a deeply controversial figure, dogged by allegations of unsavoury links to Afghanistan's lucrative opium trade and private security firms.
Copyright AFP (Agence France-Presse), 2011