A suicide bomber detonated his explosives in a parking lot near the court in the Afghan capital, according to Basir Mojahid, spokesman for Kabul's chief of police.
The attack at around 3:45 p.m. local time targeted Supreme Court employees as they were leaving for the day, Mojahid said.
At least 35 people were wounded in the blast, according to Saleem Rasooli, head of Kabul hospitals.
In a post Wednesday on Twitter, ISIS claimed responsibility for the attack.
An eyewitness told CNN that he felt the explosion shake the ground as he was leaving his office, opposite the Supreme Court.
Nimatullah Mati said the area is home to several residential apartments and was crowded Tuesday afternoon with people who were heading home from work.
Ambulances and firetrucks arrived on the scene within five minutes, Mati said.
Afghanistan's chief executive, Abdullah Abdullah, expressed his condolences on Twitter.
"The blood of our people isn't cheap & won't be wasted," he said.
NATO also condemned the attack.
"Anyone who seeks to destabilize the pillars of a functioning government are enemies of Afghanistan," Italian army Lt. Gen. Rosario Castellano, deputy commander of the NATO mission in Afghanistan, said in a statement.
The blast comes a month after at least 36 people were killed and dozens wounded in two suicide bombings near the Afghan Parliament in Kabul
. The Taliban claimed responsibility for those January 10 attacks.
Tuesday's blast underscores the growing concern about the security situation in Afghanistan, where the country's security forces and its international allies have been fighting Taliban militants and other radical groups for years.
A new report Monday from the UN Assistance Mission in Afghanistan
said more than 11,000 people were killed or injured in 2016. That's the highest number of civilian casualties in a single year since the United Nations began systemically documenting those in 2009.
The report also shows a record spike in the number of children killed in the long-running Afghanistan War.
Of the 3,498 killed last year, 923 were children, the report said. Anti-government forces, mainly the Taliban, were behind almost two-thirds of the casualties, according to the report.
ISIS militants have established a presence in the country, and their attacks particularly target Shia Muslims, the report said.