Two women, who have not yet been identified, were killed en route to their office in a court vehicle, according to Ahmad Fahim Qaweem, a spokesman for the Supreme Court.
The attack at around 8:30am in the capital also left their driver wounded, and police say it is being investigated by security forces.
“Unfortunately, we have lost two women judges in today’s attack. Their driver is wounded,” Qaweem said.
More than 200 female judges work for the country’s top court, he added.
The shooting is latest in a series of targeted attacks against government officials, journalists and activists across the country.
Despite officials repeatedly pointing the finger at the Taliban, a spokesperson for the militant group said its fighters were not involved.
The Taliban has denied involvement in the majority of the bloodshed, but has said its supporters would continue to “eliminate” important government figures – but not journalists or civil society members.
Some of these killings have been claimed by the rival jihadist Islamic State group.
The early-morning ambush comes just days after the Pentagon announced the biggest reduction of U.S troops in Afghanistan in two decades, with just 2,500 troops now deployed there, compared with 4,000 in November, and 100,000 during the Obama administration.
The escalating violence has somewhat complicated the peace talks between the countries in Doha, as sources from both sides believe progress will only occur when President-elect Joe Biden takes office.
Biden will have to navigate the Trump administration’s pledge to the Taliban to remove all U.S. military, intelligence and contractor personnel from the war-torn country by May.
The Democrat has previously supported keeping a small anti-terrorism force in Afghanistan to deter extremist attacks on the United States.
Just two weeks ago, the spokesman for the US forces in Afghanistan, Col Sonny Leggett directly accused the Taliban of carrying out the relentless attacks.
He tweeted: “The Taliban’s campaign of unclaimed attacks and targeted killings of government officials, civil society leaders & journalists must cease for peace to succeed.”
In February 2017, at least 22 people were killed and 41 wounded when a suicide bomber targeted the Supreme Court.
The Islamic State claimed responsibility for the attack.
The deputy governor of Kabul, Mahboobullah Mohebi, was killed alongside his secretary by a bomb attached to their vehicle exploded in December.
An Afghan journalist and human rights activist was shot and killed by unknown gunmen at the start of the new year.
He was the fifth journalist to be killed in the last two months.