The incident took place in Salar district of Wardak province as Mohammad Anwar Rahmani was on his way to Ghazni province from capital Kabul.
According to a statement released by Ghazni police, Mr. Rahmani was captured by the Taliban militants and was shot dead afterwards.
The statement further added that another judge was also accompanying Mr. Rahmani but he survived the attack.
The Taliban militants group has not commented regarding the report so far which comes amid deteriorating security situation as the Taliban-led insurgency has been rampant during the recent months.
Wardak is among the restive provinces located near capital Kabul where anti-government armed militants including the Taliban insurgents are actively operating in a number of its districts.
The Taliban insurgents are frequently capturing passengers travelling on the highway connecting the southern provinces with capital Kabul and assassinate them on charges of cooperating with the government.