Hafizullah’s murder comes after two female Supreme Court judges were shot dead in Kabul last month.
A string of attacks in Afghanistan has killed four government employees and four policemen, officials said.
In the capital, Kabul, gunmen on Tuesday opened fire in the Bagh-e-Daud neighbourhood and killed four employees of the ministry for rural development, according to Ferdaws Faramarz, spokesman for the city’s police chief.
Elsewhere in Kabul, a sticky bomb attached to a car exploded, wounding another government employee, he added.
Also on Tuesday, four police officers were killed and a fifth wounded when their vehicle struck a roadside bomb in western Herat province’s Zenda Jan district, provincial governor Wahid Qatali said.
No one immediately claimed responsibility for the attacks.
Afghan and US officials have blamed the Taliban for the wave of violence, although the group has rejected the charges.
Violence in Afghanistan has been relentless while peace talks between the Taliban and government representatives that started in September in Qatar have now stalled.
Meanwhile, there has been a nationwide spike in bombings, targeted killings and violence.
The capital Kabul has seen near-daily attacks during the busy morning commute, targeting prominent Afghans including politicians, journalists, activists, judges, and religious scholars.
Tuesday’s attacks came a day after three bomb blasts rattled the capital, killing at least one person.
Last week, Judge Hafizullah was attacked in an ambush in the eastern city of Jalalabad as he headed to work. He was the third court official to be killed in less than a month.
On January 17, two female judges were killed by unknown gunmen in Kabul.
In a report published on January 30, the US Special Inspector General for Afghanistan Reconstruction (SIGAR) said the Taliban and the ISIL (ISIS) armed group have increased targeted killings of government officials, civil society leaders and journalists.
Resolute Support, the NATO-led mission in Afghanistan, reported 2,586 civilian casualties from October 1 to December 31 last year, including 810 killed and 1,776 wounded, according to the SIGAR report.
The rise in violence has led US President Joe Biden’s administration to launch a review of a deal signed between Washington and the Taliban last year that agreed the withdrawal of all American troops.
The deal also paved the way for intra-Afghan talks between Taliban representatives and the Afghan government to decades of conflict. But frustration and fear have grown over the recent spike in violence, with either side blaming the other.
Government negotiators are pushing for a permanent ceasefire, but the Taliban has so far dismissed calls for a truce.