Dawa Khan Menapal, the director of Afghanistan's Government Media and Information Centre, was killed by the Taliban in the capital Kabul on Friday.
Menapal's death is the latest killing of a government official just days after an assassination attempt on the country's acting defence minister.
The Taliban spokesman Zabihullah Mujahid confirmed the killing to the Associated Press.
The assassination took place during weekly Friday prayers, according to the Interior Ministry's deputy spokesman, Said Hamid Rushan. After the shooting, Afghan forces fanned out across the neighbourhood of Kabul where Menapal was gunned down while riding in his car.
Mujahid later put out a statement claiming responsibility and said that Menapal "was killed in a special attack."
The Taliban often target government officials and those they perceive as working for the government or foreign forces, though several recent attacks have been claimed by the Islamic State. The government most often holds the Taliban responsible.
Earlier this week, a Taliban bombing targeted Afghanistan's acting defence minister, Bismillah Khan Mohammadi. The attack in a heavily guarded upscale Kabul neighbourhood late Tuesday killed at least eight people and wounded 20. The minister was unharmed.
The bombing was followed by a gun battle that also killed four Taliban fighters. The militants said the attack was to avenge Taliban fighters killed during government offensives in rural provinces.
Menapal's slaying comes amid Taliban advances and battles for more territory as American and NATO forces complete their final pullout from Afghanistan by the end of the month.
The Taliban have been waging fierce battles for months across the country, laying siege to provincial capitals in the south and west after capturing district after district and even seizing several key border crossings.
Taliban make gains
Also on Friday, in southern Nimroz province, the capital of Zaranj appeared to be the first provincial capital to fall to the Taliban, though the government claimed there was still fierce fighting around key infrastructure in the city.
But the Taliban posted images on social media showing insurgents inside the local airport and posing for photographs at the entrance to the city.
Nimroz is sparsely populated in a region that's mainly desert and Zaranj has about 50,000 residents. Its fall to the Taliban, if confirmed, was a mostly symbolic victory for the insurgents.
Meanwhile, Afghan and American aircrafts pounded Taliban positions in southern Afghanistan's Helmand province on Friday, as the insurgents closed a major border crossing with neighbouring Pakistan.
Residents in Helmand's contested provincial capital, Lashkar Gah, said airstrikes destroyed a market in the centre of the city — an area controlled by the Taliban. Afghan officials say the Taliban now control nine out of the 10 districts of the city.
Afghanistan's elite commandos have deployed to Lashkar Gah, backed up by airstrikes by the Afghan and American air forces.
The Taliban began sweeping across Afghanistan at an unexpected speed after the United States and NATO began their final pullout in late April.
The bitter fighting has displaced hundreds of thousands of Afghans, now living in miserable conditions in improvised shelters and makeshift camps. Inside the cities where fighting is underway, thousands are trapped and unable to move from their homes.
In the southern city of Kandahar, the capital of the province with the same name, hundreds are sheltering in makeshift camps, wondering where they will get food for their children.
In the Helmand capital of Lashkar Gah, the shuttered office of Action Against Hunger, a global humanitarian organisation, was hit in an air strike on Thursday, the group said in a statement. Fighting had forced the organisation to close its office last week.
More than half of Afghanistan's 421 districts and district centres are now in Taliban hands. While many of the districts are in remote regions, some are deeply strategic, giving the Taliban control of lucrative border crossings with Iran, Tajikistan and Pakistan.
Conflict with Pakistan
In southeastern Afghanistan, the Taliban last month took control of the town of Spin Boldak on the border with Pakistan, one of Afghanistan's busiest border crossings. Thousands of Afghans and Pakistanis cross daily and a steady stream of trucks passes through, bringing goods to land-locked Afghanistan from the Arabian Sea port city of Karachi in Pakistan.
The Taliban shuttered the crossing Friday over a visa dispute, claiming Pakistan was abiding by Kabul government requirements for Afghans travelling into Pakistan to have a passport and a Pakistan visa. Previously, travel documents were rarely demanded and Afghans with local ID cards could cross into Pakistan.
"The border will stay closed until Pakistan allows all Afghans to cross on the bases of our old procedure," said the Taliban statement.
At the border, traders said about 1,500 people were waiting on both sides Friday to pass through. More than 600 trucks, many loaded with perishable fresh foods, were backed up in both countries.
Islamabad's relationship with Kabul has been deeply troubled with both sides accusing each other of harbouring militants. Afghan Taliban leaders live in Pakistan and Kabul is bitterly critical of Pakistan for aiding them and treating their fighters in hospitals in Pakistan.
Islamabad meanwhile charges that Kabul provides a safe haven to the Pakistani Taliban, a separate militant group that regularly stages attacks in Pakistan.