The executed man, identified as Tajmir from Herat province, was killed with three shots from an assault rifle by the victim's father.
The Taliban authorities on Wednesday publically executed an Afghan convicted of murder -- the first time this has happened since the former insurgents took over Afghanistan last year, a spokesman said.
The announcement underscored the intentions of Afghanistan's new rulers to continue the hardline policies implemented since they took over the country in August of last year and to stick to their interpretation of Sharia, or Islamic law.
The execution -- said to have been carried out with an assault rifle by the victim's father -- took place in western Farah province before hundreds of spectators and many top Taliban officials, according to Zabihullah Mujahid, the top Taliban government spokesman.
The decision to carry out the punishment was "made very carefully," Mujahid said, following approval by three of the country's highest courts and the Taliban supreme leader, Mullah Haibatullah Akhundzada.
The executed man, identified just as Tajmir from Herat province, was convicted of killing another man five years ago and stealing his motorcycle and mobile phone.
The victim was identified as Mustafa and was said to have been from the neighbouring Farah province. Many Afghan men identify by only one name.
Taliban security forces had arrested Tajmir after the victim's family accused him of the crime, said a statement from Mujahid, the spokesman.
The statement did not say when the arrest took place but claimed Tajmir had purportedly confessed to the killing.
During the previous Taliban rule of the country in the late 1990s, the group carried out public executions, floggings and stoning of those convicted of crimes in Taliban courts.
After they overran Afghanistan in 2021 -- in the final weeks of the US and NATO forces' pullout from the country after 20 years of war -- the Taliban had initially promised to allow for women's and minority rights.
Instead, they have restricted rights and freedoms, including imposing a ban on girls' education beyond the sixth grade.
They have also carried out public lashings across different provinces, punishing several men and women accused of theft, adultery or running away from home.
The former insurgents have struggled in their transition from warfare to governing amid an economic downturn and the international community's withholding of official recognition.